Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FSChangeHandler ¶
FSChangeHandler provides a callback mechanism used by the FileWatcher to notify about changes to monitored directory or file.
type FileWatcher ¶
type FileWatcher struct {
// contains filtered or unexported fields
}
FileWatcher uses fsnotify to watch file system changes done to files or directories, notifying the respective handlers. It is recommended to watch directories over files (you can add filters to limit the scope of files to be observed).
func NewWatcher ¶
func NewWatcher() (*FileWatcher, error)
func (*FileWatcher) Add ¶
func (w *FileWatcher) Add(name string, handler FSChangeHandler, filters ...*regexp.Regexp)
func (*FileWatcher) Start ¶
func (w *FileWatcher) Start(stopCh <-chan struct{})
Click to show internal directories.
Click to hide internal directories.