Documentation
¶
Overview ¶
Package fsutil provides safe and configurable filesystem traversal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileInfo ¶
FileInfo represents a file to be analyzed.
func Walk ¶
func Walk(opts WalkOptions) ([]FileInfo, error)
Walk recursively walks the filesystem and returns files that match the options.
type WalkOptions ¶
type WalkOptions struct {
RootDir string // root path to start scanning from
ExcludedPaths []string // relative paths to exclude (subdirs or globs)
AllowedExtensions []string // file extensions to include (e.g. .go)
MaxFileSizeBytes int64 // maximum allowed file size in bytes
FollowSymlinks bool // whether to follow symbolic links
IncludeHiddenFiles bool // whether to include dotfiles
}
WalkOptions defines parameters for walking the file tree.
Click to show internal directories.
Click to hide internal directories.