In order of preference, the best technique last: 1. -attributesOfItemAtPath:error: — can only give you some info info on if the file is writable 2. -isWritableAtPath: — takes more into account, but can't be sure. Gives you no details on *why* isn't writable 3. Actually try to write the directory
Always, always use #3 if you can; it's the only way to be sure. On 10 Jan 2012, at 08:49, Rick C. wrote: > Hi, > > Just looking for confirmation, I can use NSFileManager isWritableAtPath: if I > want to check if a directory can be written to correct? Or do I have to use > attributesOfItemAtPath:error:? I don't need to change permissions just to > see if it's writable. Thanks! > > rc_______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net > > This email sent to cocoa...@mikeabdullah.net _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com