fswatch

package
Version: v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL