That seems a little "brute-force", but other methods will depend on the OS: Win32, Mac/Unixy, or who-knows-what? I'll admit not knowing about anything but Win32 on that level.
Win32 provides monitoring API calls (FindFirstChange(), FindNextChangeNotification() and SHChangeNotifyRegister() all look like things to try.) You may have to code that part in XS, and other people would have more knowledge about specifics than I would (I remember using the FindXChangeNotification API calls in a C++ program a few years back.)