In Windows OS, MS provides ReadDirectoryChangesW and FindFirstChangeNotification API to dectect new or modified file, does the Mac OSX provide equal function as well?
In Mac OS X Leopard monitor file changes with the File System Events API
See http://pypi.python.org/pypi/MacFSEvents/0.2.1 for a Python implementation.
OS X provides a framework called FSEvents, I don't know much about the specifics of it though.
来源:https://stackoverflow.com/questions/645321/how-to-dectect-new-or-modified-files-in-mac-osx