Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileEvent ¶
type FileEvent struct {
// Path to the file
Path string
}
FileEvent signals that a file is in the watch directory is ready to be processed.
type StableFileWatcher ¶
type StableFileWatcher struct {
// StableThreshold is the duration that a file must not change
// before a signaling an event for the file.
StableThreshold time.Duration
// Events signal when a file has stabilized.
Events chan FileEvent
// contains filtered or unexported fields
}
StableFile watches for new files, waiting for the file to be completely written before signaling an event.
func NewStableFileWatcher ¶
func NewStableFileWatcher(watchDir string, stableThreshold time.Duration) (*StableFileWatcher, error)
NewStableFileWatcher watcher for a directory.
Click to show internal directories.
Click to hide internal directories.