• 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: File Detection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File Detection


  • Subject: Re: File Detection
  • From: Nathan Day <email@hidden>
  • Date: Tue, 29 Apr 2003 00:40:55 +0930

Just had a couple of thought on alternative was to do this, if your app only needs to note the change when it is brought to front then you could use this event to check.

Or you could use AppleScripts folder actions, you can use AppleScripts to attach another AppleScript to a folder which sends an message to you app every time something is added to the folder. You could perhaps even do this by simple telling your app to open the added items, the you would not have to add any special AppleScript events to your app.

On Monday, April 28, 2003, at 08:30 PM, Nathan Day wrote:

Someone has released some code that does this and they basically just do what you suggest periodically checking for any change. If you are not to concerned with knowing immediately about any change, polling every 5 secs or even every 5 min, then this is not much for cpu running at 1 GHz.

On Monday, April 28, 2003, at 06:21 PM, Anthony Cheung wrote:

Hello everyone,

I am writing a Cocoa application which detects what files are go into a
folder, that is a hot folder. I have checked NSFileManager which provides a
delegate method - willProcessPath: . However, it seems that NSFileManager
doesn't have any notification center.

Then what I do is to attach a NSTimer and regularly check if there is any new
file come into the folder. However, I am afraid that will involve a lot of
processor resource. Would you kindly suggest another method.

Nathan Day
http://homepage.mac.com/nathan_day/
_______________________________________________
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.

References: 
 >Re: File Detection (From: Nathan Day <email@hidden>)

  • Prev by Date: Re: WeakCache?
  • Next by Date: Re: WeakCache?
  • Previous by thread: Re: File Detection
  • Next by thread: Re: File Detection
  • Index(es):
    • Date
    • Thread