cli

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Watch

func Watch()

Watch is the main function that runs the watcher.

Types

type Watcher

type Watcher struct {
	// Path is the path you want to watch
	Path string `yaml:"path"`
	// Destination is the path you want files to be relocated
	Destination string `yaml:"destination"`
	// Ext is the file extention you want to watch for
	Ext string `yaml:"ext"`
	// Operation is the event operation you want to watch for
	// CREATE, MODIFY, REMOVE, CHMOD, WRITE etc.
	Operation string `yaml:"operation"`
	// Pattern is the regex pattern to match against events
	Pattern string `yaml:"pattern"`
}

Watcher is a struct that contains a path, destination, and file extention and event operation. in yaml format

type Watchers

type Watchers struct {
	// Watchers is a list of watchers
	Watchers        []Watcher `yaml:"watchers,mapstructure"`
	PollingInterval int       `yaml:pollingInterval`
}

Watchers is a struct that contains a list of watchers. in yaml format

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL