Re: Knowing file system changes?
Re: Knowing file system changes?
- Subject: Re: Knowing file system changes?
- From: Eric Peyton <email@hidden>
- Date: Sat, 13 Apr 2002 08:26:25 -0500
Unfortunately, I don't believe this API will do you anything without the
old Workspace.app functionality working (and since Workspace.app no
longer exists and Finder doesn't send NSNotifications ...)
OS X does not provide a generic mechanism for you to receive
notifications about the creation, copying, moving, deletion, etc. of
files.
There are requests to do so at the file system layer. As far as I know
there are no current plans. You would need to query a Darwin list and
talk to the filesystem team on those lists.
You will need to narrow down your subject a little more if that is what
you are trying to do. You can easily poll a single directory (or
multiple directories) without issue, but you cannot receive generic
notifications at this time.
Eric
On Saturday, April 13, 2002, at 08:06 AM, Lorenzo Puleo wrote:
Hi everybody
I am new to Cocoa programing and am having a problem.
Is it possible to know, using Cocoa or C, when a change, such as
creation or
copying or moving or renaming of a file, occurs in the file system? If
so
how?
TIA
With regards
Gokul
Hi,
I'm not sure this is what you mean. Anyway it could help to find the
way for
solving your question. To know more about this, go to the Bacth-Find
area
and type "NSWorkspace". There you will find many other stuffs.
BOOL hasChanged;
hasChanged = [[NSWorkspace sharedWorkspace] fileSystemChanged];
- (BOOL)fileSystemChanged
Returns YES if a change to the file system has been registered with a
noteFileSystemChanged message since the last fileSystemChanged message;
NO
otherwise.
Bye
--
Lorenzo Puleo
mailto:email@hidden
_______________________________________________
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.