Cross platform library for file change notification.


Version on this page:
LTS Haskell 22.29:
Stackage Nightly 2024-07-19:
Latest on Hackage:

See all snapshots fsnotify appears in

BSD-3-Clause licensed by Mark Dittmer, Niklas Broberg
Maintained by Tom McLaughlin
This version can be pinned in stack with:fsnotify-,2988

Module documentation for

hfsnotify Linux and Mac build Status Windows build status

Unified Haskell interface for basic file system notifications.

This is a library. There are executables built on top of it.



compile with -fthreaded




API breaking update with a number of bugfixes and improvements.

  • Now we can detect directory creation/deletion. A boolean flag has been added to Event to indicate if the event pertains to a directory or not. This is the only API change.
  • Test stability improvements + CI test suites now passing on Windows, Linux, and Mac.
  • Interpreting OSX hfsevents flags is more sane now (see comments in OSX.hs for details).
  • Improve a race condition when adding watches on Linux.
  • Improve robustness of the PollManager.
  • Fix double call to closeHandle on Windows.
  • Remove comments about locking from the documentation.


Update to the new hinotify API (v0.3.10)


Catch IO exceptions when initialising inotify on Linux

Version 0.2.1

Don’t use system-filepath

Version 0.2

Use filepath instead of deprecated system-filepath


  • Fix the tests


  • Restore compatibility with GHC 7.4
  • Fix a bug in treeExtAny, which previously work identically to treeExtExists
  • Improve documentation


Include CHANGELOG.md and README.md in the source distribution.

Version 0.1

  • Allow to stop a listening job. Note this changes the return type of watching functions from () to IO ().
  • Previously, some care was taken to prevent multiple callbacks from running simultaneously. It is now the user’s responsibility. See #43 for details.
  • Previously, paths returned to callbacks were relative on Windows. Now they are absolute, like on the other platforms.
  • The WatchConfig type has changed. Previously, it only specified debouncing parameters. Now it also contains polling parameters.
  • The isPollingManager function is added to determine, at runtime, whether the polling implementation is used.