tree

package
v1.55.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tree

func Tree(fsrc fs.Fs, outFile io.Writer, opts *tree.Options) error

Tree lists fsrc to outFile using the Options passed in

Types

type FileInfo

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

FileInfo maps an fs.DirEntry into an os.FileInfo

func (*FileInfo) IsDir

func (to *FileInfo) IsDir() bool

IsDir is abbreviation for Mode().IsDir()

func (*FileInfo) ModTime

func (to *FileInfo) ModTime() time.Time

ModTime is modification time

func (*FileInfo) Mode

func (to *FileInfo) Mode() os.FileMode

Mode is file mode bits

func (*FileInfo) Name

func (to *FileInfo) Name() string

Name is base name of the file

func (*FileInfo) Size

func (to *FileInfo) Size() int64

Size in bytes for regular files; system-dependent for others

func (*FileInfo) String

func (to *FileInfo) String() string

String returns the full path

func (*FileInfo) Sys

func (to *FileInfo) Sys() interface{}

Sys is underlying data source (can return nil)

type Fs

type Fs dirtree.DirTree

Fs maps an fs.Fs into a tree.Fs

func NewFs

func NewFs(dirs dirtree.DirTree) Fs

NewFs creates a new tree

func (Fs) ReadDir

func (dirs Fs) ReadDir(dir string) (names []string, err error)

ReadDir returns info about the directory and fills up the directory cache

func (Fs) Stat

func (dirs Fs) Stat(filePath string) (fi os.FileInfo, err error)

Stat returns info about the file

Jump to

Keyboard shortcuts

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