fswatch

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package fswatch watches directory with fsnotify.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Watcher

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

Watcher watches a directory.

func New

func New(ctx context.Context, dir string) (*Watcher, error)

New creates new watcher watching directory. It will close when ctx is cancelled.

func (*Watcher) Close

func (w *Watcher) Close() error

Close stops watcher.

func (*Watcher) Next

func (w *Watcher) Next(ctx context.Context) (fsnotify.Event, error)

Next gets next watched event.

Jump to

Keyboard shortcuts

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