filesystem

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WalkAll

func WalkAll(ctx context.Context, root string) (<-chan DirEntry, <-chan error)

WalkAll() spawns a new goroutine to recursively walk the filesystem starting at the given root directory.

All files that are discovered in this way are sent to the DirEntry output channel. Any errors that are encountered are sent to the error output channel. If any error is encountered, the walk is continued (callers can choose to stop the walk by cancelling the context). WalkAll() does not follow symbolic links.

Types

type DirEntry

type DirEntry interface {
	fs.DirEntry
	Path() string
}

The type used to represent individual files or directories on the filesystem. WalkAll() returns a channel of DirEntry objects.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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