filewatch

package
v0.1.0-rc.14 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package filewatch normalizes native filesystem notifications. Only Linux installs per-directory watches; macOS and Windows watch whole subtrees.

Index

Constants

View Source
const Recursive = false

Variables

View Source
var ErrOverflow = errors.New("filesystem event queue overflow")

Functions

This section is empty.

Types

type Event

type Event struct {
	Name      string
	Op        Op
	Directory bool
}

func (Event) Has

func (e Event) Has(op Op) bool

type Op

type Op uint8
const (
	Create Op = 1 << iota
	Write
	Remove
	Rename
	Chmod
)

type Watcher

type Watcher struct {
	Events chan Event
	Errors chan error
	// contains filtered or unexported fields
}

func New

func New() (*Watcher, error)

func (*Watcher) Add

func (w *Watcher) Add(name string) error

func (*Watcher) Close

func (w *Watcher) Close() error

func (*Watcher) Remove

func (w *Watcher) Remove(name string) error

Jump to

Keyboard shortcuts

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