title: How to Monitor Changes in a Directory on Mac OS X?
body: <p>In the Windows API, when you monitor a directory, the callback provides what changed. How do I accomplish the same for Mac OS X?</p>
  
  <p>I looked at the File System Events API and the Kernel Events API and it seems like they both watch a file descriptor and return what changes happened to that file descriptor. This is inconvenient because now I have to open watchers on the entire file structure and remember the previous names (in case of a rename).</p>
  
  <p>Is there a better way (that doesn't involve a library)?</p>