Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileMonitor ¶
type FileMonitor struct {
Path string // 监控的文件/目录路径
Immediate bool // 是否立即执行命令
Delay time.Duration // 执行命令的延时
OnFileChange func() // 文件变化时的回调函数
}
FileMonitor 是文件监控组件的结构体
func NewFileMonitor ¶
func NewFileMonitor(path string, immediate bool, delay time.Duration, onFileChange func()) *FileMonitor
NewFileMonitor 创建一个新的文件监控组件
Click to show internal directories.
Click to hide internal directories.