bigslice: github.com/grailbio/bigslice/internal/walker Index | Files

package walker

import "github.com/grailbio/bigslice/internal/walker"

Index

Package Files

walker.go

type Walker Uses

type Walker struct {
    // contains filtered or unexported fields
}

Walker walks a recursive directory hierarchy, exposing a scanner-like interface.

func (*Walker) Err Uses

func (w *Walker) Err() error

Err returns the first error that occurred while scanning.

func (*Walker) Info Uses

func (w *Walker) Info() os.FileInfo

Info returns the os.FileInfo for the most recent path scanned.

func (*Walker) Init Uses

func (w *Walker) Init(root string)

Init initializes a walker to walk from a root path.

func (*Walker) Path Uses

func (w *Walker) Path() string

Path returns the most recent path that was scanned.

func (*Walker) Relpath Uses

func (w *Walker) Relpath() string

Relpath returns the most recent path that was scanned, relative to the scan root directory.

func (*Walker) Scan Uses

func (w *Walker) Scan() bool

Scan advances the walker to the next entry in the hierarchy. It returns false either when the scan stops because we have reached the end of the input or else because there was error. After Scan returns, the Err method returns any error that occurred during scanning.

Package walker imports 3 packages (graph). Updated 2019-10-02. Refresh now. Tools for package owners.