Re: filesystem notifications
Re: filesystem notifications
- Subject: Re: filesystem notifications
- From: Tom Waters <email@hidden>
- Date: Mon, 28 May 2001 17:51:23 -0700
The problem with this method is it misses all changes that don't send
NSWorkspace noteFileSystemChanged messages, which seems to be almost all
of them.
e.g. downloads from most tools, anything happening at the BSD layer,
shell access, etc.
You have to resort to polling the file system itself to keep up to date.
There was a great OS feature back in the late 80's in SGI's Irix that
gave user level programs instantaneous notifications of changes to the
file system. It made their "Finder", which was called Workspace oddly
enough, really super responsive. You could touch a file in the
filesystem and it would show up in a couple hundred milliseconds as an
empty file, which had a neat doughnut icon, then if you cat'ed some text
into it, it would show up as a document immediately. If the text began
with %!PS the icon would immediately change to be a postscript file,
etc. Very slick.
On Monday, May 28, 2001, at 05:06 PM, Rob Rix wrote:
I'm currently getting notified with the NSWorkspace notifications,
some of them work reliably like the app launching or volume mounting,
but I don't get called for files being created, moved or deleted.
any ideas?
I have a need for this functionality also. The only other thing from
the NSWorkspace notification for changes in the file system that I
could find is periodically polling the shared workspace like this:
someBooleanValue = [[NSWorkspace sharedWorkspace] fileSystemHasChanged];
Hope this is of help, and I hope that the difficulties with
notifications goes away,