But my real intent is to find out if I have enough permissions to
rename a file. And as Kevin said, "Write permission on a directory
affects whether or not you can rename files, or add other files and
subdirectories to the directory." In essence, I only needed to
check the read-write permission of the folder.
Aren't unix file permissions fun?
Did you know that you can change the contents of a "read only" file
if you have write permissions to the enclosing directory?
Xcode used to have a bug where it would happily overwrite locked
project files. Seems that if you do a "Safe Save" (as Apple
recommends), there's really no need to actually have write permission
to the file in question. Just write a temp file, and then swap the
files (which only requires write permission to the directory). Voila!
--
-- Marshall
It is by caffeine alone I set my mind in motion.
It is by the beans of Java that thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion.
_______________________________________________
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