Documentation
¶
Overview ¶
Package fsnotify implements file system notification.
Index ¶
Constants ¶
View Source
const ( FSN_CREATE = 1 FSN_MODIFY = 2 FSN_DELETE = 4 FSN_RENAME = 8 FSN_ALL = FSN_MODIFY | FSN_DELETE | FSN_RENAME | FSN_CREATE )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileEvent ¶
type FileEvent struct { Name string // File name (optional) // contains filtered or unexported fields }
Event is the type of the notification messages received on the watcher's Event channel.
func (*FileEvent) IsAttrib ¶
IsAttrib reports whether the FileEvent was triggered by a change in the file metadata.
func (*FileEvent) IsModify ¶
IsModify reports whether the FileEvent was triggered by a file modification or attribute change
type Watcher ¶
type Watcher struct { Event chan *FileEvent // Events are returned on this channel Error chan error // Errors are sent on this channel // contains filtered or unexported fields }
A Watcher waits for and receives event notifications for a specific set of files and directories.
func (*Watcher) Close ¶
Close closes a Watcher. It sends a message to the reader goroutine to quit and removes all watches associated with the watcher.
func (*Watcher) RemoveWatch ¶
Remove a watch on a file
Click to show internal directories.
Click to hide internal directories.