fileutil

package
v0.0.0-...-3e848aa Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Op

type Op int

Op represents file operation type.

const (
	Modify Op = iota + 1
	Remove
)

type Watch

type Watch interface {
	// Initialize Initializes the file watch, and reads file init data.
	Initialize() error
	// Run runs file watch, then handles file change event.
	Run()
	// Shutdown Shutdowns file watch.
	Shutdown() error
}

Watch represents file change event under dir and all sub dirs.

func NewWatch

func NewWatch(dir string, nodifyFn func(fileName string, op Op)) Watch

NewWatch creates a file Watch instance.

Jump to

Keyboard shortcuts

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