• 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: Notification of filesystem changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notification of filesystem changes


  • Subject: Re: Notification of filesystem changes
  • From: Alastair Houghton <email@hidden>
  • Date: Fri, 13 Jan 2006 00:26:23 +0000

On 12 Jan 2006, at 20:40, Paul J. Lucas wrote:

	I'm writing a specialized file browser.  Is there any way to be
	notified when the filesystem changes, e.g., a file/folder is
	added/removed or a disk is mounted/unmounted?

One thing you do have to realise is that some filesystems— particularly network filesystems like NFS—won't deliver notifications even if you do use (for instance) a mechanism like kqueue, simply because the server provides no mechanism to notify clients of filesystem changes. In practice, that means that whilst any notifications you can get are obviously useful, you mustn't rely on them and must provide another way for the display to update… one good option is to look for changes whenever the window is clicked on (or brought to the front), as that behaviour turns out to be reasonably intuitive.


You might also consider whether it's sensible to update the data in your application on a timer, or slowly in the background somehow.

Also, the CocoaDev wiki has a page about this topic

  http://www.cocoadev.com/index.pl?FileSystemNotifications

Kind regards,

Alastair.

--
www.alastairs-place.net


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Notification of filesystem changes (From: "Paul J. Lucas" <email@hidden>)

  • Prev by Date: Re: create a graph with cocoa
  • Next by Date: Re: Cocoa Custom NSCell Binding Issue
  • Previous by thread: Re: Notification of filesystem changes
  • Next by thread: FW: Detecting Rosetta
  • Index(es):
    • Date
    • Thread