filewatcher

package
v0.0.0-...-a3dc05e Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RWatcher

type RWatcher struct {
	//you can for select all events and errors
	Events chan fsnotify.Event
	Errors chan error
	// contains filtered or unexported fields
}

RWatcher Recursive file or directory watcher

func NewWatcher

func NewWatcher() (*RWatcher, error)

NewWatcher create RWatcher

func (*RWatcher) AddRecursive

func (rw *RWatcher) AddRecursive(name string) error

AddRecursive watch the directory and all sub-directories

func (*RWatcher) Close

func (rw *RWatcher) Close() error

Close remove all watche and close the events channel

func (*RWatcher) RemoveRecursive

func (rw *RWatcher) RemoveRecursive(name string) error

RemoveRecursive stop watch the directory and all sub-directories

Jump to

Keyboard shortcuts

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