xfs

package
v0.0.0-...-016edcc Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NilPath = Path{}

Functions

func CloseEnsureROFD

func CloseEnsureROFD(f *os.File) error

CloseEnsureROFD ensures the fd is ro; fixing the issue described in https://github.com/rust-lang/rust/issues/114554

func Cp

func Cp(ctx context.Context, from, to string) error
func CpHardlink(ctx context.Context, from, to string) error

func CreateParentDir

func CreateParentDir(path string) error

func DeleteDir

func DeleteDir(dir string, async bool) error

func IsDirEmpty

func IsDirEmpty(name string) (bool, error)

func IsGlob

func IsGlob(path string) bool

func MakeDirsReadOnly

func MakeDirsReadOnly(dir string)

func MakeDirsReadWrite

func MakeDirsReadWrite(dir string)

func PathExists

func PathExists(filename string) bool

func PathMatchAny

func PathMatchAny(path string, matchers ...string) (bool, error)

func PathMatchExactOrPrefixAny

func PathMatchExactOrPrefixAny(path string, matchers ...string) (bool, error)

func ProcessUniquePath

func ProcessUniquePath(p string) string

func RandPath

func RandPath(base, prefix, suffix string) string

func StarWalk

func StarWalk(ctx context.Context, root, pattern string, ignore []string, fn fs.WalkDirFunc) error

func StarWalkAbs

func StarWalkAbs(ctx context.Context, root, pattern string, ignore []string, fn fs.WalkDirFunc) error

func Touch

func Touch(filename string) error

func WriteFileSync

func WriteFileSync(name string, data []byte, perm os.FileMode) error

Types

type AtomicFile

type AtomicFile struct {
	*os.File
	// contains filtered or unexported fields
}

func AtomicCreate

func AtomicCreate(name string) (*AtomicFile, error)

func (*AtomicFile) Close

func (f *AtomicFile) Close() error

type Path

type Path struct {
	// contains filtered or unexported fields
}

func NewPath

func NewPath(root, relRoot string) Path

func NewPathAbs

func NewPathAbs(root, relRoot, abs string) Path

func (Path) Abs

func (p Path) Abs() string

func (Path) Join

func (p Path) Join(elem ...string) Path

func (*Path) MarshalJSON

func (p *Path) MarshalJSON() ([]byte, error)

func (Path) RelRoot

func (p Path) RelRoot() string

func (Path) Root

func (p Path) Root() string

func (*Path) UnmarshalJSON

func (p *Path) UnmarshalJSON(b []byte) error

func (Path) WithRoot

func (p Path) WithRoot(root string) Path

type Paths

type Paths []Path

func (Paths) Sort

func (ps Paths) Sort()

func (Paths) WithRoot

func (ps Paths) WithRoot(root string) Paths

type RelPath

type RelPath struct {
	// contains filtered or unexported fields
}

func NewRelPath

func NewRelPath(relRoot string) RelPath

func (RelPath) RelRoot

func (p RelPath) RelRoot() string

func (RelPath) WithRoot

func (p RelPath) WithRoot(root string) Path

type RelPaths

type RelPaths []RelPath

func (RelPaths) Sort

func (ps RelPaths) Sort()

func (RelPaths) WithRoot

func (ps RelPaths) WithRoot(abs string) Paths

type RelablePath

type RelablePath interface {
	RelRoot() string
	RootablePath
}

type RootablePath

type RootablePath interface {
	WithRoot(root string) Path
}

type RootablePaths

type RootablePaths interface {
	WithRoot(root string) Paths
}

Jump to

Keyboard shortcuts

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