watch

package
v0.0.0-...-ae9aa4e Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2015 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileChangedCallback

type FileChangedCallback interface {
	FileChanged(string)
}

type FileCreatedCallback

type FileCreatedCallback interface {
	FileCreated(string)
}

type FileRemovedCallback

type FileRemovedCallback interface {
	FileRemoved(string)
}

type FileRenamedCallback

type FileRenamedCallback interface {
	FileRenamed(string)
}

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

Wrapper around fsnotify watcher to suit lime needs Enables:

  • Watching directories, we will have less individual watchers
  • Have multiple subscribers on one file or directory resolves #285
  • Watching a path which doesn't exist yet
  • Watching and applying action on certain events

func NewWatcher

func NewWatcher() (*Watcher, error)

func (*Watcher) Observe

func (w *Watcher) Observe()

func (*Watcher) UnWatch

func (w *Watcher) UnWatch(name string, cb interface{}) error

func (*Watcher) Watch

func (w *Watcher) Watch(name string, cb interface{}) error

Jump to

Keyboard shortcuts

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