Re: my app monitoring all files opened?
Re: my app monitoring all files opened?
- Subject: Re: my app monitoring all files opened?
- From: p3consulting <email@hidden>
- Date: Sat, 6 Mar 2004 09:55:14 +0100
You should check the archives of the list (and
email@hidden) : this topic has already
been discussed.
In few words:
this is a Operating System level problem,
Mac OS X/Darwin don't have a system call to do that - as some other
U*xes have (some may think of Solaris),
so we have to use polling
(that means CPU costly and unreliable (a process may open and close (or
create/delete) a file in the interval time of the polling... so your
never see it).
See
stat, fstat and lstat in C code (man 2 fstat),
at Terminal : fstat (man 1 fstat) and lsof
There is also a port of "poll" command at
http://www.clapper.org/software/poll/
Pascal Pochet
email@hidden
On 6 mars 2004, at 00:49, email@hidden wrote:
is there a way to become a global monitor i wanted to monitor every
file being opened or be notified?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.