CmsWeb/App_Code/FileSystemManager.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Web;
namespace Tryine.FileManager
{
/// <summary>
/// FileSystemManager
/// </summary>
public class FileSystemManager
{
private static string strRootFolder;
static FileSystemManager()
{
strRootFolder = HttpContext.Current.Request.PhysicalApplicationPath;
strRootFolder = strRootFolder.Substring(0, strRootFolder.LastIndexOf(@"\"));
}
/// <summary>
/// 读根目录
/// </summary>
/// <returns></returns>
public static string GetRootPath()
{
return strRootFolder;
}
/// <summary>
/// 写根目录
/// </summary>
/// <param name="path"></param>
public static void SetRootPath(string path)
{
strRootFolder = path;
}
/// <summary>
/// 读取列表
/// </summary>
/// <returns></returns>
public static List<FileSystemItem> GetItems()
{
return GetItems(strRootFolder);
}
/// <summary>
/// 读取列表
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
public static List<FileSystemItem> GetItems(string path)
{
if (path.IndexOf("Upload") < 0)
{
path += "//Upload//image";
}
后面还有 199 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
