| 12345678910111213141516171819202122232425262728293031323334 | 
							- namespace Universal;
 
- public class DierctoryHelper
 
- {
 
-     public static bool GetAllFiles(string folderPath, out List<string>? files, string? extenionType = null)
 
-     {
 
-         files = default;
 
-         List<FileInfo> fileInfo;
 
-         List<string>? tempFiles = [];
 
-         try
 
-         {
 
-             DirectoryInfo folder = new(folderPath);
 
-             fileInfo = [.. folder.GetFiles()];
 
-         }
 
-         catch
 
-         {
 
-             return false;
 
-         }
 
-         if (fileInfo is null || fileInfo.Count == 0)
 
-             return true;
 
-         if (!string.IsNullOrEmpty(extenionType))
 
-             fileInfo = [.. fileInfo.Where(file => string.Equals(file.Extension.Replace(".", ""), extenionType.Replace(".", "")))];
 
-         fileInfo.ForEach(t => tempFiles.Add(t.FullName));
 
-         files = tempFiles;
 
-         return true;
 
-     }
 
- }
 
 
  |