Re: IsReadableFileAtPath
Re: IsReadableFileAtPath
- Subject: Re: IsReadableFileAtPath
- From: Charles Srstka <email@hidden>
- Date: Mon, 1 Mar 2010 20:31:36 -0600
On Mar 1, 2010, at 3:24 PM, Jens Alfke wrote:
> -isReadableFileAtPath is just a convenience. If you don't want to traverse symlinks, call -fileAttributesAtPath:traverseLink: and use NO for the second parameter.
Unfortunately, fileAttributesAtPath:traverseLink: is deprecated. The replacement given is attributesOfItemAtPath:error:, which doesn’t traverse symlinks. However, the documentation claims that this behavior is not guaranteed, and may change in a future version of OS X. Sadly, there does not seem to be a non-deprecated replacement for fileAttributesAtPath:traverseLink: which has guaranteed behavior.
The best thing to do is probably to use POSIX calls such as lstat().
Charles_______________________________________________
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