Re: Monitoring a folder?
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.