You are probably looking for Win32 Directory Change Notifications . There is also a .NET API called FileSystemWatcher that provides the same functions.
The linked page provides a good example for subscribing to file system notifications. For lower access to file system changes, you will need to study Modify Logs . This API is much more complex, so the first notifications of directory changes are probably your best place to start.
To mention this, the Linux kernel has a subsystem for this inotifiy .
source share