File Busy
File Busy
- Subject: File Busy
- From: Adam Bell <email@hidden>
- Date: Sat, 15 Jul 2006 21:13:37 -0300
Title: File Busy
If you need to know that a file is already open, this works, but
is very slow:
set thisFile to
(choose file)
display
dialog
fileisOpen(POSIX path of
thisFile)
on fileisOpen(this_file)
try
do shell script "/usr/sbin/lsof "
& quoted
form
of
this_file
return true
on error
return false
end try
end fileisOpen
Jon's Commands "fileIsBusy" uniformly returns
false for the simple reason, I assume, that the "busy status"
in the properties of a file remains "false" even if you
attempt to change it to true (which does not cause an error) and when
the file is open in another application.
I assume this is a bug unless I don't understand what "busy
status" means.
Adam
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden