Пример #1
0
 /// <summary>
 /// Count files and directories recursively.
 /// </summary>
 /// <param name="sourcePath">Source Path at which to start to count.</param>
 /// <param name="searchPattern">Only files that match this pattern are counted.</param>
 /// <param name="excludeDirs">Directories to exclude from count.</param>
 /// <returns>Returns number of files an directories in directory tree.</returns>
 public static long NumberOfDirsAndFiles(string sourcePath, string searchPattern, ArrayList excludeDirs)
 {
     NumberOfDirsAndFiles nof = new NumberOfDirsAndFiles(sourcePath, searchPattern, excludeDirs);
     nof.ExecuteRecursiv(sourcePath);
     return nof.Count;
 }
Пример #2
0
 /// <summary>
 /// Count files and directories recursively.
 /// </summary>
 /// <param name="sourcePath">Source Path at which to start to count.</param>
 /// <returns>Returns number of files an directories in directory tree.</returns>
 public static long NumberOfDirsAndFiles(string sourcePath)
 {
     NumberOfDirsAndFiles nof = new NumberOfDirsAndFiles(sourcePath);
     nof.ExecuteRecursiv(sourcePath);
     return nof.Count;
 }