Get filesystem notifications as a stream of events https://github.com/fpco/fsnotify-conduit#readme

Version on this page:
LTS Haskell 11.14:
Stackage Nightly 2018-06-23:
Latest on Hackage:

See all snapshots fsnotify-conduit appears in

MIT licensed by Michael Snoyman
Maintained by michael@snoyman.com

Module documentation for


Get filesystem notifications as a stream of events, using the conduit package to handle the stream. This uses the fsnotify package, which uses OS-specific file notification APIs for efficiency. Simple usage example, a program which will print all events for the given directory tree:

#!/usr/bin/env stack
{- stack
     --resolver lts-6.15
     --package fsnotify-conduit
     --package conduit-combinators

import Conduit
import Data.Conduit.FSNotify
import System.Environment (getArgs)

main :: IO ()
main = do
    args <- getArgs
    dir <-
        case args of
            [dir] -> return dir
            _ -> error $ "Expected one argument (directory to watch)"
        $ sourceFileChanges (setRelative False $ mkFileChangeSettings dir)
       $$ mapM_C (liftIO . print)


  • Support fsnotify 0.3

  • Drop older GHC support
  • Make test suite more reliable #2
  • Provide acquireSourceFileChanges

  • Initial release
Used by 1 package:
comments powered byDisqus