Safe Haskell | None |
---|---|
Language | Haskell2010 |
A streaming wrapper around System.FSNotify.
Synopsis
- watchTree :: WatchConfig -> FilePath -> (Event -> Bool) -> Stream (Of Event) Managed a
- data Event
- data WatchManager
- data WatchConfig = WatchConfig {}
- data Debounce
- defaultConfig :: WatchConfig
Documentation
Re-exports
A file event reported by a file watcher. Each event contains the canonical path for the file and a timestamp guaranteed to be after the event occurred (timestamps represent current time when FSEvents receives it from the OS and/or platform-specific Haskell modules).
data WatchManager #
Watch manager. You need one in order to create watching jobs.
data WatchConfig #
Watch configuration
WatchConfig | |
|
This specifies whether multiple events from the same file should be collapsed together, and how close is close enough.
This is performed by ignoring any event that occurs to the same file until the specified time interval has elapsed.
Note that the current debouncing logic may fail to report certain changes to a file, potentially leaving your program in a state that is not consistent with the filesystem.
Make sure that if you are using this feature, all changes you make as a
result of an Event
notification are both non-essential and idempotent.
DebounceDefault | perform debouncing based on the default time interval of 1 millisecond |
Debounce NominalDiffTime | perform debouncing based on the specified time interval |
NoDebounce | do not perform debouncing |
defaultConfig :: WatchConfig #
Default configuration
- Debouncing is enabled with a time interval of 1 millisecond
- Polling is disabled
- The polling interval defaults to 1 second