Replace()

File::Replace(const String&, const String&, const String&, bool) 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=1)

Arguments

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