System::IO::File::Replace method

File::Replace method

Replaces the contents of a one file with another and creates a backup of the replaced file.

static void System::IO::File::Replace(const String &sourceFileName, const String &destinationFileName, const String &destinationBackupFileName, bool ignoreMetadataErrors=true)
ParameterTypeDescription
sourceFileNameconst String&A name of the file to replace with
destinationFileNameconst String&A name of the file to replace
destinationBackupFileNameconst String&A name of the backup file
ignoreMetadataErrorsboolSpecifies if the merge errors from the replaced file to the replacement file should be ignored (true) or not (false)

See Also