/// <summary> /// Gets file size recursively. /// </summary> /// <param name="sourcePath">Source Path at which to start to calculate filesize.</param> /// <param name="searchPattern">Only files that match this pattern are counted.</param> /// <param name="excludeDirs">Directories to exclude from filesize.</param> /// <returns>Returns size of directory tree.</returns> public static long GetSizeRecursiv(string sourcePath, string searchPattern, ArrayList excludeDirs) { FileSize fs = new FileSize(sourcePath, searchPattern, excludeDirs); fs.ExecuteRecursiv(sourcePath); return fs.Size; }
/// <summary> /// Gets file size recursively. /// </summary> /// <param name="sourcePath">Source Path at which to start to calculate filesize.</param> /// <param name="searchPattern">Only files that match this pattern are counted.</param> /// <returns>Returns size of directory tree.</returns> public static long GetSizeRecursiv(string sourcePath, string searchPattern) { FileSize fs = new FileSize(sourcePath, searchPattern); fs.ExecuteRecursiv(sourcePath); return fs.Size; }