You are here

replaceFileAtURL:withContentsOfFileAtURL

- (BOOL)replaceFileAtURL:(NSURL *)destinationURL withContentsOfFileAtURL:(NSURL)sourceURL error:(NSError **)error - Replaces the content of the file at the given URL with the contents of another file.

Parameters

(NSURL *)destinationURL
String specifying the destination URL.
(NSURL *)sourceURL
The contents with which to replace the destination file, loaded from the source file URL.
(NSError **)error
Error object

Returns

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

Example