• 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: Monitoring a folder?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Monitoring a folder?


  • Subject: Re: Monitoring a folder?
  • From: Shawn Erickson <email@hidden>
  • Date: Tue, 20 Apr 2004 09:07:26 -0700

On Apr 20, 2004, at 8:26 AM, Christoffer Lerno wrote:

Would it be possible to have a program that watches a folder and gets notified whenever something is written to it? Is it possible to maybe even get information about the process that made the change (creating a new file, changing file contents etc)

You can attach AppleScripts to a folder that can do things, they are called Folder Actions [1].

Additionally you can use kqueues [2] to monitor changes like what you outlined. Apple even provides a code example of this [3].

-Shawn

[1] <http://www.apple.com/applescript/folderactions/>
[2] <http://developer.apple.com/documentation/Darwin/Reference/ManPages/ html/kqueue.2.html>
[3] <http://developer.apple.com/samplecode/FileNotification/ FileNotification.html>
_______________________________________________
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: Monitoring a folder?
      • From: Matt Jaffa <email@hidden>
References: 
 >Monitoring a folder? (From: Christoffer Lerno <email@hidden>)

  • Prev by Date: Re: [little OT] Licensing/Implementing in Cocoa/Obj-C
  • Next by Date: Re: [little OT] Licensing/Implementing in Cocoa/Obj-C
  • Previous by thread: Re: Monitoring a folder?
  • Next by thread: Re: Monitoring a folder?
  • Index(es):
    • Date
    • Thread