public static bool Exists(this IFileSystemOperator fileSystemOperator, string path) { var output = fileSystemOperator.FileOrDirectorySwitch(path, () => true, // If the path is a file, then it exists. () => fileSystemOperator.ExistsDirectory(path)); // Else the path is either a directory, or does not exist. return(output); }
public static bool IsExistingDirectory(this IFileSystemOperator fileSystemOperator, string path) { var output = fileSystemOperator.ExistsDirectory(path); return(output); }