Re: Is a network file in use?
Re: Is a network file in use?
- Subject: Re: Is a network file in use?
- From: Mark Douma <email@hidden>
- Date: Wed, 24 Mar 2004 20:14:31 -0500
On Mar 23, 2004, at 1:18 PM, Jones, Robert wrote:
I've done some reading through the archives but can't find a reference
to my
specific issue:
Multiple users on multiple Macs (OS X 10.2.8 at the moment, but moving
to
Panther soon) opening and closing files on a network volume. Files
will also
be written to (and read from) via AppleScript, but obviously can't be
written to if someone already has the file open (locally or over the
network... server is also OS X). How can I trap whether the file is in
use,
or busy, or locked by someone?
The 'info for' command of the Standard Additions scripting addition has
a "busy status" property.
For example, if I run the following script in Script Editor, I'll get
the corresponding result:
set my_file_ to alias "mdouma46:Desktop:46.jpg"
set my_file_info_ to info for my_file_
set busy_status_ to busy status of my_file_info_
Result: false
Not sure how accurate it is with files on networked volumes, but it
might be a starting point at least.
Hope this helps...
------------------------------------------------------------------------
---
Mark Douma
Grand Rapids, MI, USA
email@hidden
http://homepage.mac.com/mdouma46/
------------------------------------------------------------------------
---
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.