watch

package
v0.0.0-...-b76d872 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Watcher

type Watcher struct {
	Watcher   *fsnotify.Watcher
	EventChan chan fsnotify.Event
}

Watcher file system notification using event channel.

func (Watcher) AddRootWithSubDirs

func (w Watcher) AddRootWithSubDirs(root string) error

AddRootWithSubDirs adds root and subdirectories recursively.

func (Watcher) Watch

func (w Watcher) Watch()

Watch watches new files and directories. Files are added to event channel for processing and directories are added to Watcher for watching new files.

Jump to

Keyboard shortcuts

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