August 2011
Intermediate to advanced
552 pages
23h 48m
English
Example 16.5 shows a program that displays all of the historical events for the boot drive that have happened since it was last run. After that, it displays new events as they occur. To keep things simple, it exits after seeing 20 new events. It saves the device UUID and last event ID to the user defaults when it quits.
Example 16.5. fsevents.m
// fsevents.m -- Watch file system events. // gcc -std=c99 -g -Wall -framework Foundation -framework CoreServices // -o fsevents fsevents.m #import <Foundation/Foundation.h> #import <CoreServices/CoreServices.h> ...
Read now
Unlock full access