fsWalk

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile

func ReadFile(filename string, fileSystem http.FileSystem) ([]byte, error)

Returns the content of a file that is embedded in the file system.

func WalkDir

func WalkDir(fileSystem http.FileSystem, directory string, fn fs.WalkDirFunc) error

Walks the embedded filesystem calling `fn` for each file or directory found. All errors that arise visiting files and directories are filtered by `fn`. The files are walked in lexical order.

Types

type DirEntry

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

func (*DirEntry) Info

func (d *DirEntry) Info() (fs.FileInfo, error)

func (*DirEntry) IsDir

func (d *DirEntry) IsDir() bool

func (*DirEntry) Name

func (d *DirEntry) Name() string

func (*DirEntry) Type

func (d *DirEntry) Type() fs.FileMode

Jump to

Keyboard shortcuts

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