watcher

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 []string
	// contains filtered or unexported fields
}

RecursiveWatcher is a fsnotify watcher with recursice

func NewRecursiveWatcher

func NewRecursiveWatcher(path string, interval time.Duration) (*RecursiveWatcher, error)

NewRecursiveWatcher return a watcher with recursive

func (*RecursiveWatcher) AddFolder

func (watcher *RecursiveWatcher) AddFolder(folder string)

AddFolder add the folder to watcher

func (*RecursiveWatcher) Run

func (watcher *RecursiveWatcher) Run()

Run starts the watcher

Jump to

Keyboard shortcuts

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