• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can ASObjC Check File Busy Status?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Can ASObjC Check File Busy Status?
      • From: Shane Stanley <email@hidden>
References: 
 >Can ASObjC Check File Busy Status? (From: Christopher Stone <email@hidden>)
 >Re: Can ASObjC Check File Busy Status? (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Can ASObjC Check File Busy Status?
  • Next by Date: Re: Can ASObjC Check File Busy Status?
  • Previous by thread: Re: Can ASObjC Check File Busy Status?
  • Next by thread: Re: Can ASObjC Check File Busy Status?
  • Index(es):
    • Date
    • Thread