public abstract ReplaceFile ( string sourceFullPath, string destFullPath, string destBackupFullPath, bool ignoreMetadataErrors ) : void | ||
sourceFullPath | string | |
destFullPath | string | |
destBackupFullPath | string | |
ignoreMetadataErrors | bool | |
Результат | void |
public static void Replace(string sourceFileName, string destinationFileName, string?destinationBackupFileName, bool ignoreMetadataErrors) { ArgumentNullException.ThrowIfNull(sourceFileName); ArgumentNullException.ThrowIfNull(destinationFileName); FileSystem.ReplaceFile( Path.GetFullPath(sourceFileName), Path.GetFullPath(destinationFileName), destinationBackupFileName != null ? Path.GetFullPath(destinationBackupFileName) : null, ignoreMetadataErrors); }
public FileInfo Replace(string destinationFileName, string?destinationBackupFileName, bool ignoreMetadataErrors) { ArgumentNullException.ThrowIfNull(destinationFileName); FileSystem.ReplaceFile( FullPath, Path.GetFullPath(destinationFileName), destinationBackupFileName != null ? Path.GetFullPath(destinationBackupFileName) : null, ignoreMetadataErrors); return(new FileInfo(destinationFileName)); }
public FileInfo Replace(string destinationFileName, string destinationBackupFileName, bool ignoreMetadataErrors) { if (destinationFileName == null) { throw new ArgumentNullException(nameof(destinationFileName)); } FileSystem.ReplaceFile( FullPath, Path.GetFullPath(destinationFileName), destinationBackupFileName != null ? Path.GetFullPath(destinationBackupFileName) : null, ignoreMetadataErrors); return(new FileInfo(destinationFileName)); }
public static void Replace(string sourceFileName, string destinationFileName, string destinationBackupFileName, bool ignoreMetadataErrors) { if (sourceFileName == null) { throw new ArgumentNullException(nameof(sourceFileName)); } if (destinationFileName == null) { throw new ArgumentNullException(nameof(destinationFileName)); } FileSystem.ReplaceFile( Path.GetFullPath(sourceFileName), Path.GetFullPath(destinationFileName), destinationBackupFileName != null ? Path.GetFullPath(destinationBackupFileName) : null, ignoreMetadataErrors); }