System.IO.FileSystem.ReplaceFile C# (CSharp) Méthode

ReplaceFile() public abstract méthode

public abstract ReplaceFile ( string sourceFullPath, string destFullPath, string destBackupFullPath, bool ignoreMetadataErrors ) : void
sourceFullPath string
destFullPath string
destBackupFullPath string
ignoreMetadataErrors bool
Résultat void
        public abstract void ReplaceFile(string sourceFullPath, string destFullPath, string destBackupFullPath, bool ignoreMetadataErrors);
        public abstract void DeleteFile(string fullPath);

Usage Example

Exemple #1
0
        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);
        }
All Usage Examples Of System.IO.FileSystem::ReplaceFile