fsevent

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	// Relative path to the file or directory.
	Name string `json:"name"`
	// File operation that triggered the event.
	Op Op `json:"op"`
	// User metadata
	Metadata map[string]string `json:"metadata"`
}

Event represents a single file system notification.

func (Event) String

func (e Event) String() string

String returns a string representation of the event in the form "file: REMOVE|WRITE|..."

type Op

type Op uint32

Op describes a set of file operations.

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

These are the generalized file operations that can trigger a notification.

func NewOp

func NewOp(s string) Op

NewOp converts a given string to Op

func (Op) String

func (op Op) String() string

Jump to

Keyboard shortcuts

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