Documentation ¶
Index ¶
- func AppendChangedToOutputFile(typeStr string, fileName string, isDir bool)
- func IgnoreFile(fileName string) bool
- func LetItChanged(typeId int, fileName string)
- func OutPutToFile()
- func TimerCheck()
- type ActionPath
- type NotifyFile
- func (notifyFile *NotifyFile) DeleteItWatcher(path string)
- func (notifyFile *NotifyFile) LetItWatcher(path string)
- func (notifyFile *NotifyFile) PushEventChannel(Path string, ActionType fsnotify.Op, desc string, source string, target string)
- func (notifyFile *NotifyFile) WatchDir(sourcePath string, targetPath string)
- func (notifyFile *NotifyFile) WatchEvents(sourcePath string, targetPath string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendChangedToOutputFile ¶
AppendChangedToOutputFile 追加变更历史
func IgnoreFile ¶
func LetItChanged ¶
Types ¶
type ActionPath ¶
type ActionPath struct { Path string ActionType fsnotify.Op Desc string SourcePath string TargetPath string }
ActionPath 文件操作
type NotifyFile ¶
type NotifyFile struct { Watch *fsnotify.Watcher Path chan ActionPath }
NotifyFile 包的指针结构
func (*NotifyFile) DeleteItWatcher ¶
func (notifyFile *NotifyFile) DeleteItWatcher(path string)
DeleteItWatcher 从监控集合中删除
func (*NotifyFile) LetItWatcher ¶
func (notifyFile *NotifyFile) LetItWatcher(path string)
LetItWatcher 加入监控集合中
func (*NotifyFile) PushEventChannel ¶
func (notifyFile *NotifyFile) PushEventChannel(Path string, ActionType fsnotify.Op, desc string, source string, target string)
PushEventChannel 将发生事件加入 channel
func (*NotifyFile) WatchDir ¶
func (notifyFile *NotifyFile) WatchDir(sourcePath string, targetPath string)
WatchDir a directory
func (*NotifyFile) WatchEvents ¶
func (notifyFile *NotifyFile) WatchEvents(sourcePath string, targetPath string)
WatchEvents Handle the watch events 监控目录
Click to show internal directories.
Click to hide internal directories.