Tom,

You can use shell() to do an "ls -l" on the parent of the directory
you're looking for. Look at the first "column" of data (the access
modes) to determine if the directory is read only or not. 

Here's a way to do it (in this example, I'm looking at a directory
called "Evaluate" on my desktop to see if it is read only):

on mouseUp
  answer IsReadOnly("Evaluate")
end mouseUp

function IsReadOnly pWhat 
  -- Go to the home folder, then the Desktop 
  -- folder inside, then get a listing
  put shell("cd ~;cd desktop;ls -l") into temp
  put lineOffset(space & pWhat &cr,temp) into tLine
  put char 2 to 10 of word 1 of tLine into tAccessModes
  return ("w" is in tAccessModes)
end IsReadOnly

Hope this helps,

Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/ 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Thomas Speitel
> Sent: Tuesday, May 27, 2003 4:53 PM
> To: [EMAIL PROTECTED]
> Subject: Determining if a Mac OS X directory is locked
> 
> 
> 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
> www.hawaii.edu/crdg
> 
> _______________________________________________
> use-revolution mailing list
> [EMAIL PROTECTED] 
> http://lists.runrev.com/mailman/listinfo/use-> revolution
> 


_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to