Documentation ¶
Overview ¶
Package fswatch provides a platform-independent filewatcher which debounces events to avoid using files before they are entirly written to disk
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Watcher ¶
type Watcher struct { // IgnoreTemporaryFiles indicates if files which // are CREATEd and DELETEd during the debounce duration are ignored // The default value is true. // If this is false, only the DELETE event is emitted right after it occurs. IgnoreTemporaryFiles bool // Events is the channel on which all events are published Events chan fsnotify.Event // Errors is the channel on which all errors are published Errors chan error // contains filtered or unexported fields }
Watcher is a debounced filewatcher If a CREATE / WRITE happens it waits for {debounceDuration} to publish the event and resets the {debounceDuration} when a new WRITE event is created for the file
func NewWatcher ¶
NewWatcher creates a new watcher with the specified debounceDuration
Click to show internal directories.
Click to hide internal directories.