Documentation ¶
Index ¶
- type FileWatcher
- func (w *FileWatcher) OnChmodEvent(f func(fsnotify.Event))
- func (w *FileWatcher) OnCreateEvent(f func(fsnotify.Event))
- func (w *FileWatcher) OnRemoveEvent(f func(fsnotify.Event))
- func (w *FileWatcher) OnRenameEvent(f func(fsnotify.Event))
- func (w *FileWatcher) OnWriteEvent(f func(fsnotify.Event))
- func (w *FileWatcher) Start()
- func (w *FileWatcher) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileWatcher ¶
type FileWatcher struct { LastModify int64 //上次变更时间戳(秒) FilePath string //文件路径 // contains filtered or unexported fields }
func (*FileWatcher) OnChmodEvent ¶
func (w *FileWatcher) OnChmodEvent(f func(fsnotify.Event))
设置权限修改事件
func (*FileWatcher) OnCreateEvent ¶
func (w *FileWatcher) OnCreateEvent(f func(fsnotify.Event))
设置创建事件
func (*FileWatcher) OnRemoveEvent ¶
func (w *FileWatcher) OnRemoveEvent(f func(fsnotify.Event))
设置移除事件
func (*FileWatcher) OnRenameEvent ¶
func (w *FileWatcher) OnRenameEvent(f func(fsnotify.Event))
设置重命名事件
Click to show internal directories.
Click to hide internal directories.