Copyright | (c) Dong Han 2017-2020 |
---|---|
License | BSD |
Maintainer | winterland1989@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
This module provides fs watcher based on libuv's fs_event, we also maintain watch list if target OS doesn't support recursive watch(Linux's inotify).
-- start watching threads, use returned close function to cleanup watching threads. (close, srcf) <- watchDirs ["fold_to_be_watch"] -- dup a file event source src <- srcf -- print event to stdout runBIO $ src >|> sinkToIO printLineStd
Documentation
File event with path info.
Instances
Eq FileEvent Source # | |
Ord FileEvent Source # | |
Defined in Z.IO.FileSystem.Watch | |
Read FileEvent Source # | |
Show FileEvent Source # | |
Generic FileEvent Source # | |
JSON FileEvent Source # | |
Print FileEvent Source # | |
Defined in Z.IO.FileSystem.Watch toUTF8BuilderP :: Int -> FileEvent -> Builder () # | |
type Rep FileEvent Source # | |
Defined in Z.IO.FileSystem.Watch type Rep FileEvent = D1 ('MetaData "FileEvent" "Z.IO.FileSystem.Watch" "Z-IO-0.4.0.0-yZ8PAxRS7u6ehgjyvfzwd" 'False) (C1 ('MetaCons "FileAdd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CBytes)) :+: (C1 ('MetaCons "FileRemove" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CBytes)) :+: C1 ('MetaCons "FileModify" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CBytes)))) |