添加缩略图同步功能

This commit is contained in:
橙子
2022-10-17 01:10:31 +08:00
parent 50d43a2fc5
commit 16d25fb60d
23 changed files with 568 additions and 136 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
@@ -10,6 +11,8 @@ namespace Yi.Framework.Common.Helper
private bool _alreadyDispose = false;
#region
public FileHelper()
{
@@ -391,5 +394,19 @@ namespace Yi.Framework.Common.Helper
}
}
#endregion
/// <summary>
/// 获取目录下全部文件名
/// </summary>
/// <param name="path"></param>
/// <param name="pattern"></param>
/// <returns></returns>
public static List<string> GetAllFileNames(string path, string pattern = "*")
{
List<FileInfo> folder = new DirectoryInfo(path).GetFiles(pattern).ToList();
return folder.Select(x => x.Name).ToList();
}
}
}