Version: 1.2

Posted: 2005-10-27

Build Requirements: Xcode

Runtime Requirements: Mac OS X 10.3

View Source Code:

Download Sample (“FileNotification.zip”, 222.8K)
Download Sample (“FileNotification.dmg”, 284.1K)



Description

Demonstrates how to use the kqueue mechanism to be notified when the contents of a folder change. Efficient method for detecting when a file is added, deleted, or renamed. This sample creates a simple MP thread which watches a few defined locations for modifications, then posts the event back to the main queue to display the relevant kevent information to the main window.

Document Revision History

Date Notes
2005-10-27Updated to produce a universal binary. No code changes were required.
2004-04-15minor additions for publication
2004-02-11kqueue file notification introduced in 10.3. Notification API to detect file system modifications.

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.