Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶ added in v0.2.3
type Event struct {
Kind EventKind // what happened
Name string // file or folder name involved
Dest string // for KindOrganized: the destination; otherwise empty
Err error // set when Kind is KindError
}
Event is a single piece of activity reported by Watcher.Start.
type EventKind ¶ added in v0.2.3
type EventKind int
EventKind identifies the type of activity reported to the watch output.
type WatchOptions ¶
type WatchOptions struct {
Directory string
Preset string
Rules []string
Name string
Debounce time.Duration
Initial bool
DryRun bool
DateSource string
// EnrichFunc optionally enriches a scanned file with sample-based
// metadata (format sniffing, embedded dates, extra fields) before it is
// planned. When nil, files are planned with the built-in metadata only.
// The second return value reports whether the file was modified so the
// planner can skip re-planning untouched files.
EnrichFunc func(file models.File) (models.File, bool)
// PluginRules are custom rules contributed by installed classifier
// plugins; the shared resolver layers them in last.
PluginRules []models.Rule
// ClassifyFunc overrides category classification of incoming files (the
// composite built-in + plugin classifier). When nil, the built-in
// extension classifier is used.
ClassifyFunc func(filename, ext string) string
}
WatchOptions configures watch mode
Click to show internal directories.
Click to hide internal directories.