Re: Finder open / close notifications
Re: Finder open / close notifications
- Subject: Re: Finder open / close notifications
- From: Ken Thomases <email@hidden>
- Date: Wed, 23 Jun 2010 23:20:32 -0500
On Jun 23, 2010, at 6:00 PM, email@hidden wrote:
> I'm trying to receive a notification when a file is opened basically like the main Recent Items menu. I'd like to poll a directory and monitor file operations for certain file types. Specifically open / close operations ... just looking for suggestions, I've dabbled with Uli UKKQueue but don't seem to receive open / close notifications. Was wondering is there a way to register for the finders notifications? possibly something new in 10.6?
I don't believe the Finder is emitting notifications, as such. It's just passing the file to Launch Services (possibly via NSWorkspace), just like any other app would to open a document.
If you really just want to monitor the Recent Items menu, you can look into the LSSharedFileList API and the LSSharedFileListAddObserver() function. See the header at /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/LSSharedFileList.h.
Regards,
Ken
_______________________________________________
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