System::IO::FileInfo::Replace method

FileInfo::Replace(const String&, const String&) method

Replaces the contents of a specified destination file with the file represented by the current FileInfo object and creates a backup of the replaced file.

FileInfoPtr System::IO::FileInfo::Replace(const String &destinationFileName, const String &destinationBackupFileName)
ParameterTypeDescription
destinationFileNameconst String&A name of the file to replace
destinationBackupFileNameconst String&A name of the backup file

ReturnValue

A FileInfor object that represents the file pointed to by destinationFileName

See Also

FileInfo::Replace(const String&, const String&, bool) method

Replaces the contents of a specified destination file with the file represented by the current FileInfo object and creates a backup of the replaced file.

FileInfoPtr System::IO::FileInfo::Replace(const String &destinationFileName, const String &destinationBackupFileName, bool ignoreMetadataErrors)
ParameterTypeDescription
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)

ReturnValue

A FileInfor object that represents the file pointed to by destinationFileName

See Also