fsw

package
v0.0.0-...-bbcbdef Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Unlicense Imports: 4 Imported by: 0

Documentation

Overview

Package fsw wraps filesystem watchers to ensure the best experience on the operating system that vidar was built for. For example, fsnotify is used on most systems; but on darwin, where the open file limits are low and watchers use up open files, we instead use a polling watcher.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Path string
	Op   Op
}

type Op

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

type Watcher

type Watcher interface {
	Add(name string) error
	Remove(name string) error
	RemoveAll() error
	Close() error
	Next() (Event, error)
}

func New

func New() (Watcher, error)

Jump to

Keyboard shortcuts

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