filepath

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

This package provides an interface to functions and structs in the standard path/filepath package to facilitate mocking.

Index

Constants

View Source
const (
	Separator     = filepath.Separator
	ListSeparator = filepath.ListSeparator
)

Variables

View Source
var (
	ErrBadPattern = filepath.ErrBadPattern
	SkipAll       = filepath.SkipAll
	SkipDir       = filepath.SkipDir
)

Functions

func NewFilePath

func NewFilePath() filePathFacade

Types

type DirEntry

type DirEntry = fs.DirEntry

type FileInfo

type FileInfo = fs.FileInfo

type FilePath

type FilePath interface {
	path.Path

	Abs(string) (string, error)
	EvalSymlinks(string) (string, error)
	FromSlash(string) string
	Glob(string) ([]string, error)
	IsLocal(string) bool
	Localize(string) (string, error)
	Rel(string, string) (string, error)
	SplitList(string) []string
	ToSlash(string) string
	VolumeName(string) string
	Walk(string, WalkFunc) error
	WalkDir(string, WalkDirFunc) error
}

type WalkDirFunc

type WalkDirFunc = fs.WalkDirFunc

type WalkFunc

type WalkFunc = filepath.WalkFunc

Jump to

Keyboard shortcuts

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