Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PathDriver ¶
type PathDriver interface {
Join(paths ...string) string
IsAbs(path string) bool
Rel(base, target string) (string, error)
Base(path string) string
Dir(path string) string
Clean(path string) string
Split(path string) (dir, file string)
Separator() byte
Abs(path string) (string, error)
Walk(string, filepath.WalkFunc) error
FromSlash(path string) string
ToSlash(path string) string
Match(pattern, name string) (matched bool, err error)
}
PathDriver provides all of the path manipulation functions in a common interface. The context should call these and never use the `filepath` package or any other package to manipulate paths.
var LocalPathDriver PathDriver = &pathDriver{}
LocalPathDriver is the exported pathDriver struct for convenience.
Click to show internal directories.
Click to hide internal directories.