filepath

package
v0.0.0-...-fab57c2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package filepath provides a mockable wrapper for path/filepath.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) Abs

func (*Impl) Abs(path string) (string, error)

func (*Impl) Base

func (*Impl) Base(path string) string

func (*Impl) Clean

func (*Impl) Clean(path string) string

func (*Impl) Dir

func (*Impl) Dir(path string) string
func (*Impl) EvalSymlinks(path string) (string, error)

func (*Impl) Ext

func (*Impl) Ext(path string) string

func (*Impl) FromSlash

func (*Impl) FromSlash(path string) string

func (*Impl) Glob

func (*Impl) Glob(pattern string) (matches []string, err error)

func (*Impl) HasPrefix

func (*Impl) HasPrefix(p string, prefix string) bool

func (*Impl) IsAbs

func (*Impl) IsAbs(path string) bool

func (*Impl) Join

func (*Impl) Join(elem ...string) string

func (*Impl) Match

func (*Impl) Match(pattern string, name string) (matched bool, err error)

func (*Impl) Rel

func (*Impl) Rel(basepath string, targpath string) (string, error)

func (*Impl) Split

func (*Impl) Split(path string) (dir string, file string)

func (*Impl) SplitList

func (*Impl) SplitList(path string) []string

func (*Impl) ToSlash

func (*Impl) ToSlash(path string) string

func (*Impl) VolumeName

func (*Impl) VolumeName(path string) string

func (*Impl) Walk

func (*Impl) Walk(root string, fn filepath.WalkFunc) error

func (*Impl) WalkDir

func (*Impl) WalkDir(root string, fn fs.WalkDirFunc) error

type Interface

type Interface interface {
	Abs(path string) (string, error)
	Base(path string) string
	Clean(path string) string
	Dir(path string) string
	EvalSymlinks(path string) (string, error)
	Ext(path string) string
	FromSlash(path string) string
	Glob(pattern string) (matches []string, err error)
	HasPrefix(p string, prefix string) bool
	IsAbs(path string) bool
	Join(elem ...string) string
	Match(pattern string, name string) (matched bool, err error)
	Rel(basepath string, targpath string) (string, error)
	Split(path string) (dir string, file string)
	SplitList(path string) []string
	ToSlash(path string) string
	VolumeName(path string) string
	Walk(root string, fn filepath.WalkFunc) error
	WalkDir(root string, fn fs.WalkDirFunc) error
}

Jump to

Keyboard shortcuts

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