Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileWatcher ¶
type FileWatcher struct { // 事件处理函数 OnCreate func(string) OnWrite func(string) OnRemove func(string) OnRename func(string) OnChmod func(string) // contains filtered or unexported fields }
FileWatcher 文件监控操作类
func NewFileWatcher ¶
func NewFileWatcher(includeExts []string) (*FileWatcher, error)
NewFileWatcher 添加要监控的目录,支持递归子目录
func (*FileWatcher) AddDirRecursive ¶ added in v1.8.81
func (fw *FileWatcher) AddDirRecursive(path string) error
AddDirRecursive 递归地添加目录及其子目录到监控列表
func (*FileWatcher) WatchFile ¶
func (fw *FileWatcher) WatchFile(path string) error
WatchFile 开始监控文件或目录 如果监控的目录不存在,则会自动创建该目录
Click to show internal directories.
Click to hide internal directories.