コード例 #1
0
 public static void CheckOverwrite(string filePath, bool overwrite)
 {
     if (!overwrite && File.Exists(filePath))
     {
         var exception = CommonFileSystem.GetCannotOverwriteFileIOException(filePath);
         throw exception;
     }
 }
コード例 #2
0
        public static IOException GetCannotOverwriteFileIOException(this IFileSystemOperator fileSystemOperator, string filePath)
        {
            var output = CommonFileSystem.GetCannotOverwriteFileIOException(filePath);

            return(output);
        }