dig

package
v0.0.0-...-151b75f Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Digger

type Digger interface {
	// Dig searches the information of a file or a directory recursively.
	Dig(name string, handler FileInfoHandler) error
}

Digger provides recursive file search operations.

func New

func New() Digger

New returns a new Digger.

type FileInfo

type FileInfo interface {
	Name() string
	Size() int64
	Mode() fs.FileMode
	ModTime() time.Time
	IsDir() bool
}

type FileInfoHandler

type FileInfoHandler func(FileInfo) Instr

type Instr

type Instr int
const (
	// InstrCancel cancels the invocation of Dig.
	InstrCancel Instr = iota
	// InstrSkipDir skips digging the children of the directory.
	InstrSkipDir
	// InstrContinue digs the children of the directory recursively.
	InstrContinue
)

func (Instr) String

func (i Instr) String() string

Jump to

Keyboard shortcuts

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