C# Class Cruncher.Extensions.DirectoryInfoExtensions

Provides extension methods to the System.IO.DirectoryInfo type.
Show file Open project: JimBobSquarePants/Cruncher

Public Methods

Method Description
EnumerateFilesAsync ( this directoryInfo, string searchPattern = "*", SearchOption searchOption = SearchOption.TopDirectoryOnly ) : Task>

Returns an enumerable collection of file information that matches a specified search pattern and search subdirectory option. Will return an empty enumerable on exception. Quick and dirty but does what I need just now.

SafeEnumerateDirectories ( this directoryInfo, string searchPattern = "*", SearchOption searchOption = SearchOption.TopDirectoryOnly ) : IEnumerable

Returns an enumerable collection of directory information that matches a specified search pattern and search subdirectory option. Will return an empty enumerable on exception. Quick and dirty but does what I need just now.

SafeEnumerateDirectoriesAsync ( this directoryInfo, string searchPattern = "*", SearchOption searchOption = SearchOption.TopDirectoryOnly ) : Task>

Returns an enumerable collection of directory information that matches a specified search pattern and search subdirectory option. Will return an empty enumerable on exception. Quick and dirty but does what I need just now.

Method Details

EnumerateFilesAsync() public static method

Returns an enumerable collection of file information that matches a specified search pattern and search subdirectory option. Will return an empty enumerable on exception. Quick and dirty but does what I need just now.
public static EnumerateFilesAsync ( this directoryInfo, string searchPattern = "*", SearchOption searchOption = SearchOption.TopDirectoryOnly ) : Task>
directoryInfo this /// The that this method extends. ///
searchPattern string /// The search string to match against the names of directories. This parameter can contain a combination of valid literal path /// and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions. The default pattern is "*", which returns all files. ///
searchOption SearchOption /// One of the enumeration values that specifies whether the search operation should include only /// the current directory or all subdirectories. The default value is TopDirectoryOnly. ///
return Task>

SafeEnumerateDirectories() public static method

Returns an enumerable collection of directory information that matches a specified search pattern and search subdirectory option. Will return an empty enumerable on exception. Quick and dirty but does what I need just now.
public static SafeEnumerateDirectories ( this directoryInfo, string searchPattern = "*", SearchOption searchOption = SearchOption.TopDirectoryOnly ) : IEnumerable
directoryInfo this /// The that this method extends. ///
searchPattern string /// The search string to match against the names of directories. This parameter can contain a combination of valid literal path /// and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions. The default pattern is "*", which returns all files. ///
searchOption SearchOption /// One of the enumeration values that specifies whether the search operation should include only /// the current directory or all subdirectories. The default value is TopDirectoryOnly. ///
return IEnumerable

SafeEnumerateDirectoriesAsync() public static method

Returns an enumerable collection of directory information that matches a specified search pattern and search subdirectory option. Will return an empty enumerable on exception. Quick and dirty but does what I need just now.
public static SafeEnumerateDirectoriesAsync ( this directoryInfo, string searchPattern = "*", SearchOption searchOption = SearchOption.TopDirectoryOnly ) : Task>
directoryInfo this /// The that this method extends. ///
searchPattern string /// The search string to match against the names of directories. This parameter can contain a combination of valid literal path /// and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions. The default pattern is "*", which returns all files. ///
searchOption SearchOption /// One of the enumeration values that specifies whether the search operation should include only /// the current directory or all subdirectories. The default value is TopDirectoryOnly. ///
return Task>