fswatcher

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package fswatcher is responsible for providing file system events to govim

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
}

func (Event) String added in v0.0.35

func (e Event) String() string

type FSWatcher

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

func New

func New(root string, filter watchFilterFn, logf logFn, tomb *tomb.Tomb) (*FSWatcher, error)

New creates a file watcher that provide events recursively for all files and directories that aren't filtered by the watch filter. The root argument must be an existing directory, in our case the module root. FSWatcher will not send events for any path (file or directory) where the filter returns "true".

func (FSWatcher) Close

func (w FSWatcher) Close() error

func (FSWatcher) Errors

func (w FSWatcher) Errors() chan error

func (FSWatcher) Events

func (w FSWatcher) Events() chan Event

type Op

type Op string
const (
	OpChanged Op = "changed"
	OpRemoved Op = "removed"
	OpCreated Op = "created"
)

Jump to

Keyboard shortcuts

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