...

Package pathdriver

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

Overview ▾

Index ▾

Package files

path_driver.go

type PathDriver

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.

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)
}

LocalPathDriver is the exported pathDriver struct for convenience.

var LocalPathDriver PathDriver = &pathDriver{}