Introduction to File System Notifications

When a file or directory is created, modified or removed, the Operating System can inform any applications that wish to know. This can come in handy in many situations:

To make this work, an application simply subscribes to be notified of events.

At least it should be that simple, but unfortunately each Operating System has a different way of doing things.

“Some of you may be familiar with existing file monitoring solutions… they are a pain in the butt to use, they are complex, they are not user friendly, and they have a lot of race conditions that you have to be aware of as a developer.”
Scaling Source Control at Facebook by Durham Goode

With fsnotify you have a platform-independent interface to file system notifications in the Go programming language. It tries to take the pain out of file system notifications so you can get on with writing your application.

This blog is here to provide updates on fsnotify itself and a deeper look at file system notifications for the curious. Until next time.