Documentation ¶
Index ¶
- Constants
- func Debounce(f func(), d time.Duration) func()
- type Watcher
- func (watcher *Watcher) AddEvent(events ...fsnotify.Op)
- func (watcher *Watcher) AddExcludes(names ...string)
- func (watcher *Watcher) AddIncludes(names ...string)
- func (watcher *Watcher) AddWatch(name string) error
- func (watcher *Watcher) Close()
- func (watcher *Watcher) Init() error
- func (watcher *Watcher) RemoveWatch(name string) error
- func (watcher *Watcher) Watch()
Constants ¶
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Watcher ¶
type Watcher struct { BasePath string Events chan fsnotify.Event Errs chan error // contains filtered or unexported fields }
Watcher 文件监控
func (*Watcher) AddExcludes ¶
AddExcludes 添加排除文件
func (*Watcher) AddIncludes ¶
AddIncludes 添加包含文件
func (*Watcher) RemoveWatch ¶
RemoveWatch 删除监听
Click to show internal directories.
Click to hide internal directories.