You are here

replaceFileAtPath:withContentsOfFileAtPath

- (BOOL)replaceFileAtPath:(NSString *)destinationPath withContentsOfFileAtPath:(NSString *)sourcePath error:(NSError **)error - Replaces the content of the file at the given path with the contents of another file.

Parameters

(NSString *)destinationPath
String specifying the destination path.
(NSString *)sourcePath
The contents with which to replace the destination file, loaded from the source file.
(NSError **)error
Error object

Returns

(BOOL) - true if the file/folder was replaced successfully.

Example