Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandlers ¶ added in v1.8.87
type EventHandlers struct { OnCreate func(string) OnWrite func(string) OnRemove func(string) OnRename func(string) OnChmod func(string) }
EventHandlers holds the functions to be called on various file system events.
type Watcher ¶
type Watcher struct { // Event handlers OnCreate func(string) OnWrite func(string) OnRemove func(string) OnRename func(string) OnChmod func(string) // contains filtered or unexported fields }
Watcher monitors file system events using fsnotify.
func NewFsnWatcher ¶
NewFsnWatcher creates a new Watcher with the specified file extensions.
func StartWatcher ¶ added in v1.8.87
func StartWatcher(dirs []string, exts []string, handlers EventHandlers) (*Watcher, error)
StartWatcher initializes the watcher, adds directories, sets event handlers, and starts monitoring.
func (*Watcher) AddDirRecursive ¶
AddDirRecursive adds directories and subdirectories to the watch list recursively.
Click to show internal directories.
Click to hide internal directories.