follow-file-0.0.2: Be notified when a file gets appended, solely with what was added.

Safe HaskellNone
LanguageHaskell2010

System.File.Follow

Synopsis

Documentation

follow Source #

Arguments

:: (MonadIO m, MonadMask m, MonadBaseControl IO m) 
=> INotify 
-> Path Abs File 
-> (Producer m ByteString -> m ())

Monadic state of m is thrown away for each invocation, not synchronously interleaved.

-> m WatchDescriptor 

follow takes a file, and informs you only when it changes. If it's deleted, | you're notified with an empty ByteString. If it doesn't exist yet, you'll be informed | of its entire contents upon it's creation, and will proceed to "follow it" as normal.