walkentry

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WalkFS

func WalkFS(fsys fs.FS, root string) iter.Seq2[WalkEntry, error]

walkFS returns an iterator that walks through the filesystem starting from root

Types

type WalkEntry

type WalkEntry struct {
	Path      string // path relative to root
	Name      string // name without extension
	Ext       string // file extension (with dot)
	IsDir     bool   // whether entry is a directory
	IsRegular bool   // whether entry is a regular file
}

WalkEntry represents a file system entry encountered during traversal.

func (*WalkEntry) IsJSONFile

func (e *WalkEntry) IsJSONFile() bool

isJSONFile returns true if the entry is a JSON file

Jump to

Keyboard shortcuts

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