I tried access and it works for files on a CD ROM. If I set a folder's "Ownership & Permission" to "Read Only", access(path, W_OK) will return 0 - meaning that I have a write access, which is incorrect.
> Hello, > > I need to determine if a file is read only based on its attributes,
> the attributes of each parent folder(s), and on it volume on which > it resides. For example, a file on a CD should always be read > only. Is there an OS call to accomplish this? > > I am able to get the attributes of files and directories by
> themselves using PBGetCatalogInfoSync and PBHGetDirAccessSync > respectively. Currently, what I do is check the file, check each > parent directory of the file, and then finally check the volume in
> which the file resides. This is way too much and it seems like I > am missing something here. > > Any help appreciated. > > Thanks, > > > _______________________________________________
> Do not post admin requests to the list. They will be ignored. > Carbon-dev mailing list (email@hidden) > Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/carbon-dev/jrh% > 40theptrgroup.com > > This email sent to
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden