예제 #1
0
 /// <summary>
 /// Get all the files in all sub folders of a path.
 /// </summary>
 /// <param name="path">the path to the folder</param
 /// <returns> a file list in an string arry</returns>
 public string[] GetAllFIlesInPath(string path)
 {
     try
     {
         return(Directory.GetFiles(path, "*.*", SearchOption.AllDirectories));
     }
     catch
     {
         CantAcsesFolderHandler?.Invoke(path);
         return(null);
     }
 }
예제 #2
0
 /// <summary>
 /// this funck gets all the sub folder in a directory- in case that the user cant acses a spesific folder it pass that folder and continue
 /// </summary>
 /// <param name="path">the main folder</param>
 /// <returns> a list of all path inaide that folder</returns>
 public string[] GetAllFoldersInPath(string path)
 {
     try
     {
         return(Directory.GetDirectories(path));
     }
     catch
     {
         CantAcsesFolderHandler?.Invoke(path);
         return(null);
     }
 }