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



No, the API result is correct.  A directory with no write
permission can still contain files that are writable.  You
have to change file permission to prevent file writes, or
you have to hide the contents of the directory from certain
users (e.g. by turning off execute a.k.a. view bits).

Write permission on a directory affects whether or not you
can rename files, or add other files and subdirectories to
the directory.

Kevin G.


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.
_______________________________________________
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>)
 >Re: How to get the Read only status of files (From: "Tolu Fapohunda" <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.