/// <summary>
/// 获取所有文件
/// </summary>
/// <returns></returns>
public static Dictionary<string, DateTime> GetAllFies(string dir)
{
Dictionary<string, DateTime> FilesList = new Dictionary<string, DateTime>();
DirectoryInfo fileDire = new DirectoryInfo(dir);
if (!fileDire.Exists)
{
throw new System.IO.FileNotFoundException("目录:" + fileDire.FullName + "没有找到!");
}
GetAllDirFiles(fileDire, FilesList);
GetAllDirsFiles(fileDire.GetDirectories(), FilesList);
return FilesList;
}
/// <summary>
/// 判断该文件是否已经在目录下存在
/// </summary>
/// <param name="path">文件路径</param>
/// <param name="fileName">文件名</param>
/// <returns></returns>
public static bool ExistsF
C# MVC选取文件夹下需要的文件压缩
于 2022-07-15 18:07:39 首次发布