I want my code to be notified when any file under (either directly or indirectly) a given directory is modified. By \"modified\", I mean I want my code to be notified whenever
The closest utility (that I know of) that matches your needs on Mac OS X is fslogger.
See the link for a description, dmg and source code:
OSXBook - fslogger