Closed sgraf812 closed 6 years ago
New subdirectories aren't immediately watched:
#!/usr/bin/env stack -- stack --resolver lts-7.4 --install-ghc runghc --package fsnotify --package directory --package temporary import Control.Concurrent import System.FSNotify import System.FilePath import System.Directory import System.IO.Temp main = withSystemTempDirectory "fsnotify" $ \baseDir -> withManager $ \mgr -> do _ <- watchTree mgr baseDir (const True) print writeFile (baseDir </> "file.txt") "whuzza" let childDir = baseDir </> "child" createDirectoryIfMissing True childDir -- threadDelay (10*1000) writeFile (childDir </> "child.txt") "whoop" threadDelay (1000*1000)
This prints only one line, instead of the expected two when that line is uncommented.
Also, this works as expected on OS X, but not on my Linux VM.
New subdirectories aren't immediately watched:
This prints only one line, instead of the expected two when that line is uncommented.
Also, this works as expected on OS X, but not on my Linux VM.