fsnotify-conduit: Get filesystem notifications as a stream of events

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

Please see the README and docs at https://www.stackage.org/package/fsnotify-conduit


[Skip to Readme]
Versions 0.1.0.0, 0.1.1.0, 0.1.1.1
Change log ChangeLog.md
Dependencies base (>=4.9 && <5), conduit (>=1.2.8), directory, filepath, fsnotify (>=0.2.1), resourcet, transformers [details]
License MIT
Copyright 2016-2018 FP Complete
Author Michael Snoyman
Maintainer michael@snoyman.com
Category Data, Conduit
Home page https://github.com/fpco/fsnotify-conduit#readme
Bug tracker https://github.com/fpco/fsnotify-conduit/issues
Source repo head: git clone https://github.com/fpco/fsnotify-conduit
Uploaded by MichaelSnoyman at Sun May 13 16:25:15 UTC 2018
Distributions LTSHaskell:0.1.1.1, NixOS:0.1.1.1, Stackage:0.1.1.1, openSUSE:0.1.0.0
Downloads 370 total (37 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-05-13 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for fsnotify-conduit-0.1.1.0

[back to package description]

fsnotify-conduit

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
     --install-ghc
     runghc
     --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)"
    runResourceT
        $ sourceFileChanges (setRelative False $ mkFileChangeSettings dir)
       $$ mapM_C (liftIO . print)