Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileWatcher ¶
type FileWatcher struct {
Handler WatchHandler
ExcludeDirs []string
// contains filtered or unexported fields
}
func New ¶
func New() *FileWatcher
func (*FileWatcher) Watch ¶
func (fw *FileWatcher) Watch() error
Watch will do an initial scan to find sub-directories to watch, and will then start listening for file updates. This is to be started in a Go routine.
type WatchHandler ¶
type WatchHandler interface {
OnStartWatching()
OnStopWatching()
// OnFileModified is called when a file of interest has been modified
OnFileModified(file string)
}
Click to show internal directories.
Click to hide internal directories.