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 DateTime GetLastModifiedTimeUTC(this IFileSystemOperator fileSystemOperator, string path)
        {
            var output = fileSystemOperator.FileOrDirectorySwitch(path,
                                                                  () => fileSystemOperator.GetFileLastModifiedTimeUTC(path),
                                                                  () => fileSystemOperator.GetDirectoryLastModifiedTimeUTC(path));

            return(output);
        }
 public static void Move(this IFileSystemOperator fileSystemOperator, string sourcePath, string destinationPath, bool overwrite = true)
 {
     fileSystemOperator.FileOrDirectorySwitch(sourcePath,
                                              () => fileSystemOperator.MoveFile(sourcePath, destinationPath, overwrite),
                                              () => fileSystemOperator.MoveDirectory(sourcePath, destinationPath));
 }
 public static void Delete(this IFileSystemOperator fileSystemOperator, string path)
 {
     fileSystemOperator.FileOrDirectorySwitch(path,
                                              () => fileSystemOperator.DeleteFile(path),
                                              () => fileSystemOperator.DeleteDirectory(path));
 }