Re: Can ASObjC Check File Busy Status?
Re: Can ASObjC Check File Busy Status?
- Subject: Re: Can ASObjC Check File Busy Status?
- From: 2551phil <email@hidden>
- Date: Fri, 20 Jan 2017 19:13:53 +0700
On 20 Jan 2017, at 19:00, Shane Stanley <email@hidden> wrote:
Unix doesn't have a concept of whether a file is busy.
Curious. NSFileManager does have an NSFileBusy constant:
NSFileBusy The key in a file attribute dictionary whose value indicates whether the file is busy.
The corresponding value is an NSNumber object containing a Boolean value.
Available in OS X v10.4 and later.
But attempting to get it returns an error:
set err to current application's NSError set f to current application's NSFileManager's defaultManager() set somePath to current application's NSString's stringWithString:"/Users/sphil/Desktop/test.txt" set d to f's attributesOfItemAtPath:somePath |error|:err d's NSFileSize -- returns successfully d's NSFileBusy -- error can't get NSFileBusy of »ocid«...
Best
Phil |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden