Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a struct which allows to use fluent API to create underlying instance of Watch.
func CreateWatch ¶
CreateWatch creates instance of Builder providing fluent functions to customize watch
interval defines how frequently (in ms) file change events should be processed.
func (*Builder) OnPaths ¶
OnPaths defines paths to be watched. If path is a directory it will recursively watch all files and subdirectories. If path is a file only this path is watched.
func (*Builder) WithHandlers ¶
WithHandlers allows to register instances of Handler which will react on file change events.
type Watch ¶
type Watch struct {
// contains filtered or unexported fields
}
Watch represents single file system watch and delegates change events to defined handler.
func (*Watch) Close ¶
func (w *Watch) Close()
Close attempts to close underlying fsnotify.Watcher. In case of failure it logs the error.
Click to show internal directories.
Click to hide internal directories.