vfs

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadDir

func ReadDir(fs http.FileSystem, name string) ([]os.FileInfo, error)

ReadDir read the contents of the directory associated with file and returns a slice of FileInfo values in directory order.

func Stat

func Stat(fs http.FileSystem, name string) (os.FileInfo, error)

Stat returns the FileInfo structure describing file.

func Walk

func Walk(fs http.FileSystem, root string, walkFn filepath.WalkFunc) error

Walk walks the filesystem rooted at root, calling walkFn for each file or directory in the filesystem, including root, All errors that arise visiting files and directories are filtered by walkFn. The files are walked in lexical order.

func WalkFiles

func WalkFiles(fs http.FileSystem, root string, walkFn WalkFilesFunc) error

WalkFiles walks the filesystem tooted at root, calling walkFun gor each file or directory inf the filesystem, including root. In addition to FileInfo, it passes an ReadSeeker to walkFn for each file it visits.

Types

type WalkFilesFunc

type WalkFilesFunc func(path string, info os.FileInfo, r io.ReadSeeker, err error) error

WalkFilesFunc is the type of the function called for each file or directory visited by WalkFiles. It's like filepath WalkFunc, except it provides an additional ReadSeeker parameter for file being visited。

Jump to

Keyboard shortcuts

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