• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Knowing file system changes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Knowing file system changes?
      • From: David Remahl <email@hidden>
References: 
 >Re: Knowing file system changes? (From: Lorenzo Puleo <email@hidden>)

  • Prev by Date: Re: Knowing file system changes?
  • Next by Date: Re: AppleEvents from Cocoa?
  • Previous by thread: Re: Knowing file system changes?
  • Next by thread: Re: Knowing file system changes?
  • Index(es):
    • Date
    • Thread