Documentation
¶
Overview ¶
Package fsnotify implements filesystem notification,.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultIsIgnorePath ¶
Types ¶
type FileEvent ¶
type FileEvent struct { *originFsnotify.FileEvent Name string Time time.Time }
it is a wrapper of github.com/howeyc/fsnotify.FileEvent
type Runner ¶
type Runner struct { *Watcher //wait WaitTime to run your function (default 0.2s) WaitTime time.Duration //whether init run this function (default true) InitRun bool }
watch and run a function you should handle error in Watcher and add some files to watch (at least)
type Watcher ¶
type Watcher struct { *originFsnotify.Watcher Event chan *FileEvent Error chan error //default ignore all file start with "." IsIgnorePath func(path string) bool //default is nil,if is nil ,error send through Error chan,if is not nil,error handle by this func ErrorHandler func(err error) // contains filtered or unexported fields }
func NewWatcher ¶
func (*Watcher) GetErrorChan ¶
func (*Watcher) GetEventChan ¶
func (*Watcher) WatchRecursion ¶
Click to show internal directories.
Click to hide internal directories.