The fsnotify-conduit package

[ Tags: conduit, data, library, mit ] [ Propose Tags ]

Please see

[Skip to Readme]


Change log
Dependencies base (>=4.7 && <5), conduit, directory, filepath, fsnotify, resourcet, transformers [details]
License MIT
Copyright 2016 FP Complete
Author Michael Snoyman
Category Data, Conduit
Home page
Source repository head: git clone
Uploaded Thu Sep 8 10:29:28 UTC 2016 by MichaelSnoyman
Distributions LTSHaskell:, NixOS:, Stackage:, Tumbleweed:
Downloads 125 total (5 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-09-08 [all 1 reports]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for fsnotify-conduit-

[back to package description]


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)