Re: cross-process file open notifications
Re: cross-process file open notifications
- Subject: Re: cross-process file open notifications
- From: Jens Alfke <email@hidden>
- Date: Wed, 3 Feb 2010 14:28:37 -0800
On Feb 3, 2010, at 1:50 PM, Alexander Cohen wrote:
Is there any way in cocoa to get some sort of notifications when any
process opens or closes any file?
I'm pretty sure there isn't. The rate at which those notifications
were sent would be pretty horrific (ever run fs_usage on all
processes?) Even the private file notification firehose that's
consumed by Spotlight only tracks modifications, not opening.
The reason i need this is because i need to watch the system and do
a certain task every time a particular dylib is loaded by an
application.
Can you put code into the dylib itself that will do this? Like a +load
method?
On Feb 3, 2010, at 1:57 PM, Dave Carrigan wrote:
The FSEvents API is most likely what you're looking for.
Come to think of it, FSEvents might not tell you about files being
opened, so it might not be exactly what you want, after all.
No, FSEvents notifies you when a particular directory (or anything
inside it) changes.
—Jens_______________________________________________
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