hfsevents-0.1.6: File/folder watching for OS X

Safe HaskellNone
LanguageHaskell98

System.OSX.FSEvents

Description

Event-based file and folder watching for OS X

Synopsis

Documentation

eventStreamCreate

Arguments

:: [FilePath]

The paths to watch

-> Double

Latency

-> Bool

Process event immediately if no other events received for at least latency

-> Bool

Ignore events caused by current process

-> Bool

Get file-level notifications instead of directory level

-> (Event -> IO a)

The action to run when an event has taken place

-> IO EventStream

The event stream, use this to destroy the stream

Create an FSEvents watch for a list of paths. The callback action will be called for each event in the watched paths until the EventStream is destroyed again. All callbacks are from a single thread, so if you take too long to process an event, further events will be delayed. Note: it's relatively expensive to create a watch, since each watch uses an operating system thread for its event loop.

eventStreamDestroy :: EventStream -> IO ()

Destroy an event stream, the callback action will not be run for new events (but there may be pending events remaining)

data Event

Constructors

Event 

Instances