Documentation
¶
Overview ¶
Package watching provides a uniform interface to native filesystem watching facilities.
Index ¶
Constants ¶
const ( // NonRecursiveWatchingSupported indicates whether or not the current // platform supports native non-recursive watching. NonRecursiveWatchingSupported = false )
const ( // RecursiveWatchingSupported indicates whether or not the current platform // supports native recursive watching. RecursiveWatchingSupported = true )
Variables ¶
This section is empty.
Functions ¶
func WatchRecursive ¶
WatchRecursive performs recursive watching on platforms which support doing so natively. The function will stobe the events channel with an empty path after the watch has been established. After this function returns, no more events will be written to the events channel.
Types ¶
type NonRecursiveMRUWatcher ¶
type NonRecursiveMRUWatcher struct { // Errors is a buffer channel (with a capacity of one) that will populated // with the first internal error that occurs in the watcher. If an error // occurs, the watcher should be stopped. It will never be populated on this // platform. Errors chan error }
NonRecursiveMRUWatcher represents a non-recursive native watcher that can watch multiple paths and evict old watches on an LRU-basis.
func NewNonRecursiveMRUWatcher ¶
func NewNonRecursiveMRUWatcher(_ chan string, _ int) (*NonRecursiveMRUWatcher, error)
NewNonRecursiveMRUWatcher creates a new non-recursive watcher that will emit event paths on the specified events channel. This function is not implemented on this platform and will panic if called.
func (*NonRecursiveMRUWatcher) Stop ¶
func (w *NonRecursiveMRUWatcher) Stop()
Stop terminates all watches. This method is not implemented on this platform and will panic if called.
func (*NonRecursiveMRUWatcher) Unwatch ¶
func (w *NonRecursiveMRUWatcher) Unwatch(_ string) error
Unwatch removes a watch path from the watcher. This method is not implemented on this platform and will panic if called.
func (*NonRecursiveMRUWatcher) Watch ¶
func (w *NonRecursiveMRUWatcher) Watch(_ string) error
Watch adds a watch path to the watcher. This method is not implemented on this platform and will panic if called.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
third_party/winfsnotify
Package winfsnotify allows the user to receive file system event notifications on Windows.
|
Package winfsnotify allows the user to receive file system event notifications on Windows. |