pather

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirEnsure

func DirEnsure(path string) error

func DirEnsureWithConfig

func DirEnsureWithConfig(path string, config DirConfig) error

func Ext added in v1.0.14

func Ext(path string) string

func GetDirs added in v1.0.15

func GetDirs(root string) ([]string, error)

func GetFiles added in v1.0.15

func GetFiles(root string) ([]string, error)

func GetPaths added in v1.0.15

func GetPaths(root string) ([]string, error)

func IsDir

func IsDir(path string) bool

func IsDirErr

func IsDirErr(path string) (bool, error)

func IsFile

func IsFile(path string) bool

func IsFileErr

func IsFileErr(path string) (bool, error)

func NormalizeExt

func NormalizeExt(ext string) string

func PathExists

func PathExists(path string) bool

func PathExistsErr

func PathExistsErr(path string) (bool, error)

func SwapExt

func SwapExt(path, oldExt, newExt string) string

func WalkDirs added in v1.0.15

func WalkDirs(root string, filterFn func(string, fs.FileInfo) bool, processFn func(string, fs.FileInfo) error) error

func WalkFiles added in v1.0.15

func WalkFiles(root string, filterFn func(string, fs.FileInfo) bool, processFn func(string, fs.FileInfo) error) error

func WalkPaths added in v1.0.15

func WalkPaths(root string, filterFn func(string, fs.FileInfo) bool, processFn func(string, fs.FileInfo) error) error

Types

type DirConfig

type DirConfig struct {
	Perm  os.FileMode
	Owner string
	Group string
}

Jump to

Keyboard shortcuts

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