O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exercises

  1. Add kqueue support to fsevents.m so that it will keep on showing all new events until the program is interrupted by a Control-C (SIGINT). Save off the event stream information and device UUID when that happens.

  2. Modify fsevents.m to watch the entire system. Watch what happens if you mount a file system and modify things on that file system. You can create read/write disk images with Disk Utility.

  3. Modify fsevents.m to watch more than one directory. Also watch what happens when you move a directory being watched. Find out where the directory got moved to by opening the root of the directory hierarchy with open() and then use fcntl() with F_GETPATH to see where it is living in the file system.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required