• 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: File System Notifications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File System Notifications


  • Subject: Re: File System Notifications
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 19 Jun 2008 18:20:21 -0700


On 17 Jun '08, at 7:04 PM, Omar Qazi wrote:

can I use those to get a notification when another application opens a file? If not is there any way I can achieve this?

No. You can't get notifications with that fine a granularity, because if the OS sent them, everything would slow to a crawl under the load of delivering so many.


The FSEvent API will tell you that something in a particular directory has changed. It doesn't tell you which file; if you need to know, you'll need to pre-scan the directory and cache the mod dates of all the files, then compare them after the notification.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >File System Notifications (From: Omar Qazi <email@hidden>)

  • Prev by Date: Re: Trying to get hang of PDO
  • Next by Date: Re: Add item to NSSavePanel sidebar
  • Previous by thread: Re: File System Notifications
  • Next by thread: getting accurate file modification time?
  • Index(es):
    • Date
    • Thread