Write with NSFileWrapper vs. copy with NSFileManager
Write with NSFileWrapper vs. copy with NSFileManager
- Subject: Write with NSFileWrapper vs. copy with NSFileManager
- From: Colas B <email@hidden>
- Date: Tue, 25 Mar 2014 12:52:43 +0000 (GMT)
Hi, I am having troubles using NSFileWrapper. In order to have a better understanding of it, I would like to ask you the following question.
Is there a difference between
NSURL *referenceURL, *destinationURL ;
[[[NSFileManager alloc] init] copyItemAtURL:referenceURL
toURL:destinationURL
error:NULL] ;
and
NSURL *referenceURL, *destinationURL ;
NSFileWrapperWritingOptions options ;
NSFileWrapper * fileWrapper = [[NSFileWrapper alloc] initWithURL:referenceURL
options:0
error:NULL] ;
[fileWrapper writeToURL:destinationURL
options:options
originalContentsURL:nil
error:NULL] ;
(especially, depending on the values of options; what would be the best choice for options here?)?
Again, I ask this question in order to understand better NSFileWrapper. I see that I have the choice in my code to use one or the other. I guess the answer might involve considerations about "hard links".
Thanks,
Colas
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden