xroot

package
v0.0.0-...-e964040 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDir

func IsDir(root string) bool

IsDir .

func MaxDepth

func MaxDepth(n int8) option

MaxDepth .

func WithCancel

func WithCancel(cancel context.CancelFunc) option

WithCancel .

Types

type File

type File string

func NewFile

func NewFile(file string) *File

NewFile .

func (*File) Handle

func (f *File) Handle(fn func(f *File) error) error

Handle do something

func (*File) String

func (f *File) String() string

String .

type Root

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

func NewRoot

func NewRoot(root string) *Root

NewRoot .

func (*Root) Dirs

func (r *Root) Dirs(opts ...option) ([]*Root, error)

Dirs .

func (*Root) Files

func (r *Root) Files(opts ...option) ([]*File, error)

Files .

func (*Root) IsDir

func (r *Root) IsDir() bool

IsDir .

func (*Root) Walk

func (r *Root) Walk(fn func(path string, info fs.FileInfo) error, opts ...option) error

Walk .

Jump to

Keyboard shortcuts

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