Documentation
¶
Index ¶
- func ReadDir(fs http.FileSystem, name string) ([]os.FileInfo, error)
- func Stat(fs http.FileSystem, name string) (os.FileInfo, error)
- func Walk(fs http.FileSystem, root string, walkFn filepath.WalkFunc) error
- func WalkFiles(fs http.FileSystem, root string, walkFn WalkFilesFunc) error
- type WalkFilesFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadDir ¶
ReadDir read the contents of the directory associated with file and returns a slice of FileInfo values in directory order.
func Walk ¶
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 ¶
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。