Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFileWatcher ¶
func AddFileWatcher(fileWatcher FileWatcher, file string, callback func())
Types ¶
type FileWatcher ¶
type FileWatcher interface { // Add Start watching a path. Calling Add multiple times on the same path panics. Add(path string) error // Remove Stop watching a path. Removing a path that's not currently being watched panics. Remove(path string) error Close() error Events(path string) chan fsnotify.Event Errors(path string) chan error }
FileWatcher is an interface that watches a set of files, delivering events to related channel.
func NewFileWatcher ¶
func NewFileWatcher() FileWatcher
NewFileWatcher return with a FileWatcher instance that implemented with fsnotify.
func NewWatcher ¶
func NewWatcher() FileWatcher
Click to show internal directories.
Click to hide internal directories.