Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RecursiveWatcher ¶
type RecursiveWatcher struct { *fsnotify.Watcher *Walker TriggerOps map[fsnotify.Op]bool Command string ExecCommandAt time.Time Delay time.Duration // contains filtered or unexported fields }
RecursiveWatcher struct
func NewRecursiveWatcher ¶
func NewRecursiveWatcher(name, command string, ops map[fsnotify.Op]bool, delay time.Duration) (*RecursiveWatcher, error)
NewRecursiveWatcher return a recursive watcher
func (*RecursiveWatcher) AddFolder ¶
func (watcher *RecursiveWatcher) AddFolder(folder string)
AddFolder add folder to recursive watcher
func (*RecursiveWatcher) DelayExecCommand ¶
func (watcher *RecursiveWatcher) DelayExecCommand()
DelayExecCommand delay execute the watcher command
func (*RecursiveWatcher) ExecCommand ¶
func (watcher *RecursiveWatcher) ExecCommand()
ExecCommand execute the command
func (*RecursiveWatcher) Run ¶
func (watcher *RecursiveWatcher) Run()
Run execute the recursive watcher
type Walker ¶
type Walker struct {
IgnorePrefix string
}
Walker a file path walker
func (*Walker) IgnoreFile ¶
IgnoreFile determines if a file should be ignored.
func (*Walker) Subfolders ¶
Subfolders returns a slice of subfolders (recursive), including the folder provided.
Click to show internal directories.
Click to hide internal directories.