reanimate/unix/Reanimate/FileWatch.hs
2019-03-09 11:42:52 +01:00

10 lines
235 B
Haskell

module Reanimate.FileWatch
( watchFile ) where
import System.INotify
watchFile :: FilePath -> IO () -> IO ()
watchFile path handler = do
notify <- initINotify
addWatch notify [Modify] path (const handler)
return ()