Determining if a Mac OS X directory is locked

Sarah sarahr at
Tue May 27 17:52:01 EDT 2003

If you get "the long folders", it gives you a line full of info for 
each folder in the default folder. The second last item is a 3 digit 
number that shows the Unix style permissions for the folder. The 3 
digits show the permissions for the owner, the group & everyone else, 
in that order. The digits if converted to binary, show whether that 
item is readable, writable & executable.

e.g. 755 - convert each digit to binary -> 111 101 101 so the owner can 
do everything, the group and guests can only read & execute. For a 
folder to be writable, you need the relevant digit to be 6 or 7.
Of course if the third digit is less than 6, then you need to work out 
whether the user is the owner or a member of the owning group :-) (I 
have no idea how to do this without using shell.)

Perhaps a simpler solution is just to try writing a tiny text file. If 
that fails, you know the folder is locked for the current user. If it 
succeeds, you can delete the test and write your movie file.

sarahr at

On Wednesday, May 28, 2003, at 08:00  am, Thomas Speitel wrote:

> Hi Folks,
> I am looking for a way to determine if a directory is locked before 
> trying to save a movie or sound file to it.
> Thanks,
> Tom
> Tom Speitel
> Curriculum Research & Development Group
> College of Education
> University of Hawaii
> 1776 University Avenue
> Honolulu, HI 96822
> Phone: 808-956-6855
> Fax: 808-956-64933
> _______________________________________________
> use-revolution mailing list
> use-revolution at

More information about the use-livecode mailing list