fastwalk

package
v0.0.0-...-35e27df Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2018 License: MIT, BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Walk

func Walk(root string, walkFn func(path string, typ os.FileMode) error) error

Walk walks the file tree rooted at root, calling walkFn for each file or directory in the tree, including root.

If Walk returns filepath.SkipDir, the directory is skipped.

Unlike filepath.Walk:

  • file stat calls must be done by the user. The only provided metadata is the file type, which does not include any permission bits.
  • multiple goroutines stat the filesystem concurrently. The provided walkFn must be safe for concurrent use.
  • fastWalk can follow symlinks if walkFn returns the traverseLink sentinel error. It is the walkFn's responsibility to prevent fastWalk from going into symlink cycles.

Types

This section is empty.

Jump to

Keyboard shortcuts

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