Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get the Read only status of files



Thanks for your help. 
 
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.

 
On 11/1/07, Jamison Hope <email@hidden> wrote:
man 2 access

On Nov 1, 2007, at 6:25 PM, Tolu Fapohunda wrote:

> 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

--
Jamison Hope
The PTR Group
www.theptrgroup.com



 _______________________________________________
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

References: 
 >How to get the Read only status of files (From: "Tolu Fapohunda" <email@hidden>)
 >Re: How to get the Read only status of files (From: Jamison Hope <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.