package pathdriver

import "github.com/containerd/continuity/pathdriver"

Index

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.

Source Files

path_driver.go

Version
v0.4.5 (latest)
Published
Oct 30, 2024
Platform
js/wasm
Imports
1 packages
Last checked
1 day ago

Tools for package owners.