watcher

package
v0.0.0-...-5ff79e2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CREATE = 0
	MODIFY = 1
	DELETE = 2
)

Variables

This section is empty.

Functions

func CreateLocalStateChange

func CreateLocalStateChange(path string, eventType int) (change structs.StateChange, err error)

func Subfolders

func Subfolders(path string) (paths []string)

Subfolders returns a slice of subfolders (recursive), including the folder provided.

Types

type RecursiveWatcher

type RecursiveWatcher struct {
	*fsnotify.Watcher
	Files   chan structs.StateChange
	Folders chan string
}

func NewRecursiveWatcher

func NewRecursiveWatcher(path string) (*RecursiveWatcher, error)

func (*RecursiveWatcher) AddFolder

func (watcher *RecursiveWatcher) AddFolder(folder string)

func (*RecursiveWatcher) Run

func (watcher *RecursiveWatcher) Run(initScanDone <-chan struct{}, debug bool)

Jump to

Keyboard shortcuts

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