Back to godoc.org

Package fswatch

v0.0.15
Latest Go to latest

The latest major version is .

Published: Jul 31, 2020 | License: BSD-3-Clause | Module: go.chromium.org/goma/server

Overview

Package fswatch watches directory with fsnotify.

Index

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.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier