Documentation
¶
Overview ¶
Package watcher provides file system watching utilities for detecting database file/directory deletions and triggering recreation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher monitors a file or directory for deletion and calls onDelete when removed. It watches the parent directory since fsnotify cannot watch non-existent files.
func New ¶
New creates a new Watcher for the given target path. The onDelete callback is called when the target is deleted.
Click to show internal directories.
Click to hide internal directories.