filewalk

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindFiles

func FindFiles(root string, acceptFn AcceptFunc, skipDirFn SkipDirFunc, relative bool) ([]string, error)

FindFiles finds matches file in root dir.

if skipDirFn is nil, no dir waill be skipped. if relative is true, return relative filename.

Types

type AcceptFunc

type AcceptFunc func(path string, info os.FileInfo) bool

AcceptFunc is the function called for each file, return true to accpet file.

The param path is an absolute path

type SkipDirFunc

type SkipDirFunc func(path string, info os.FileInfo) bool

SkipDirFunc is the function called for each directory, return true to skip dir.

The param path is an absolute path

Jump to

Keyboard shortcuts

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