Documentation ¶
Index ¶
- Variables
- func CollectFile(entries map[RelPath]fs.DirEntry) func(de DirEntry) error
- func Exists(dir Path, fnames ...string) bool
- func IsAbs(p Path) bool
- func IsDir(dir Path, fnames ...string) (bool, error)
- func IsDirEmpty(dir AbsDir) (bool, error)
- func LogFileError(de DirEntry, err error) error
- func PruneEmptyDir(dir AbsDir) error
- func Remove(f Path, pruneDirs bool) error
- func Rename(oldPath, newPath Path) error
- func Segments(fpath Path) []string
- func ShouldInExclude(includeGlobs ...Glob) func(excludeGlobs ...Glob) ShouldSkipFunc
- func Walk(fsToWalk fs.FS, shouldSkip ShouldSkipFunc, process ProcessFunc, ...) error
- type AbsDir
- func (p AbsDir) Abs() AbsPath
- func (p AbsDir) Append(relPath RelPath) Path
- func (p AbsDir) AsDir() AbsDir
- func (p AbsDir) AsRel() RelPath
- func (p AbsDir) Base() string
- func (p AbsDir) BaseName() string
- func (p AbsDir) Clean() Path
- func (p AbsDir) Create() (*os.File, error)
- func (p AbsDir) CreateForced() (*os.File, error)
- func (p AbsDir) Dir() AbsDir
- func (p AbsDir) EvalSymlinks() (Path, error)
- func (p AbsDir) Exists() bool
- func (p AbsDir) ExpandHome() Path
- func (p AbsDir) Ext() string
- func (p AbsDir) FromSlash() Path
- func (p AbsDir) InsBeforeExt(inFix string) Path
- func (ad AbsDir) IoFsFS() fs.FS
- func (p AbsDir) IsAbs() bool
- func (p AbsDir) IsDir() bool
- func (ad AbsDir) IsDirEmpty() (bool, error)
- func (p AbsDir) IsEmpty() bool
- func (p AbsDir) Join(names ...string) Path
- func (ad AbsDir) MkdirAll(perm os.FileMode) error
- func (p AbsDir) NotEmpty() bool
- func (p AbsDir) Open() (*os.File, error)
- func (p AbsDir) ReadFile() ([]byte, error)
- func (p AbsDir) RenameTo(newPath Path) error
- func (p AbsDir) Segments() []string
- func (p AbsDir) Stat() (fs.FileInfo, error)
- func (p AbsDir) String() string
- func (p AbsDir) ToSlash() Path
- func (ad AbsDir) Walk(shouldSkip ShouldSkipFunc, process ProcessFunc, handleError HandleErrorFunc) error
- func (p AbsDir) WoExt() string
- func (p AbsDir) WriteFile(data []byte, perm fs.FileMode) error
- type AbsPath
- func (p AbsPath) Abs() AbsPath
- func (p AbsPath) Append(relPath RelPath) Path
- func (p AbsPath) AsDir() AbsDir
- func (p AbsPath) AsRel() RelPath
- func (p AbsPath) Base() string
- func (p AbsPath) BaseName() string
- func (p AbsPath) Clean() Path
- func (p AbsPath) Create() (*os.File, error)
- func (p AbsPath) CreateForced() (*os.File, error)
- func (p AbsPath) Dir() AbsDir
- func (p AbsPath) EvalSymlinks() (Path, error)
- func (p AbsPath) Exists() bool
- func (p AbsPath) ExpandHome() Path
- func (p AbsPath) Ext() string
- func (p AbsPath) FromSlash() Path
- func (p AbsPath) InsBeforeExt(inFix string) Path
- func (p AbsPath) IsAbs() bool
- func (p AbsPath) IsDir() bool
- func (p AbsPath) IsEmpty() bool
- func (ap AbsPath) IsLocalTo(dir AbsDir) bool
- func (p AbsPath) Join(names ...string) Path
- func (p AbsPath) NotEmpty() bool
- func (p AbsPath) Open() (*os.File, error)
- func (p AbsPath) ReadFile() ([]byte, error)
- func (ap AbsPath) Rel(baseDir AbsDir) RelPath
- func (ap AbsPath) Remove(pruneDirs bool) error
- func (p AbsPath) RenameTo(newPath Path) error
- func (p AbsPath) Segments() []string
- func (p AbsPath) Stat() (fs.FileInfo, error)
- func (p AbsPath) String() string
- func (ap AbsPath) SymlinkTo(tgtPath AbsPath) error
- func (p AbsPath) ToSlash() Path
- func (p AbsPath) WoExt() string
- func (p AbsPath) WriteFile(data []byte, perm fs.FileMode) error
- type DirEntry
- type Glob
- type Globs
- type HandleErrorFunc
- type List
- type Path
- func Append(p Path, relPath RelPath) Path
- func Clean(p Path) Path
- func EvalSymlinks(p Path) (Path, error)
- func ExpandHome(p Path) Path
- func FromSlash(p Path) Path
- func InsBeforeExt(fpath Path, inFix string) Path
- func Join(p Path, names ...string) Path
- func New(s string) Path
- func ToSlash(p Path) Path
- type ProcessFunc
- type RelPath
- func (p RelPath) Abs() AbsPath
- func (p RelPath) Append(relPath RelPath) Path
- func (p RelPath) AsDir() AbsDir
- func (p RelPath) AsRel() RelPath
- func (p RelPath) Base() string
- func (p RelPath) BaseName() string
- func (p RelPath) Clean() Path
- func (p RelPath) Create() (*os.File, error)
- func (p RelPath) CreateForced() (*os.File, error)
- func (p RelPath) Dir() AbsDir
- func (p RelPath) EvalSymlinks() (Path, error)
- func (p RelPath) Exists() bool
- func (p RelPath) ExpandHome() Path
- func (p RelPath) Ext() string
- func (p RelPath) FromSlash() Path
- func (p RelPath) InsBeforeExt(inFix string) Path
- func (p RelPath) IsAbs() bool
- func (p RelPath) IsDir() bool
- func (p RelPath) IsEmpty() bool
- func (p RelPath) Join(names ...string) Path
- func (p RelPath) NotEmpty() bool
- func (p RelPath) Open() (*os.File, error)
- func (p RelPath) ReadFile() ([]byte, error)
- func (p RelPath) RenameTo(newPath Path) error
- func (p RelPath) Segments() []string
- func (p RelPath) Stat() (fs.FileInfo, error)
- func (p RelPath) String() string
- func (p RelPath) ToSlash() Path
- func (p RelPath) WoExt() string
- func (p RelPath) WriteFile(data []byte, perm fs.FileMode) error
- type ShouldSkipFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FollowSymlinks = true ExpandTilde = true ConvertAllToSlash = true )
Functions ¶
func IsDirEmpty ¶
func LogFileError ¶
func PruneEmptyDir ¶
func ShouldInExclude ¶
func ShouldInExclude(includeGlobs ...Glob) func(excludeGlobs ...Glob) ShouldSkipFunc
func Walk ¶
func Walk( fsToWalk fs.FS, shouldSkip ShouldSkipFunc, process ProcessFunc, handleError HandleErrorFunc, ) error
Types ¶
type AbsDir ¶
type AbsDir struct {
AbsPath
}
func (AbsDir) CreateForced ¶
func (AbsDir) EvalSymlinks ¶
func (AbsDir) ExpandHome ¶
func (p AbsDir) ExpandHome() Path
func (AbsDir) InsBeforeExt ¶
func (AbsDir) IsDirEmpty ¶
func (AbsDir) Walk ¶
func (ad AbsDir) Walk( shouldSkip ShouldSkipFunc, process ProcessFunc, handleError HandleErrorFunc, ) error
type AbsPath ¶
type AbsPath struct {
// contains filtered or unexported fields
}
func (AbsPath) CreateForced ¶
func (AbsPath) EvalSymlinks ¶
func (AbsPath) ExpandHome ¶
func (p AbsPath) ExpandHome() Path
func (AbsPath) InsBeforeExt ¶
type Glob ¶
type Glob struct { Pattern string // contains filtered or unexported fields }
func NewGlobsFromStrings ¶
type HandleErrorFunc ¶
type Path ¶
type Path interface { String() string IsEmpty() bool NotEmpty() bool Base() string Ext() string BaseName() string WoExt() string InsBeforeExt(inFix string) Path ToSlash() Path FromSlash() Path Clean() Path ExpandHome() Path EvalSymlinks() (Path, error) Abs() AbsPath Dir() AbsDir AsDir() AbsDir AsRel() RelPath Join(names ...string) Path Append(relPath RelPath) Path IsAbs() bool IsDir() bool Stat() (fs.FileInfo, error) Open() (*os.File, error) Create() (*os.File, error) CreateForced() (*os.File, error) Exists() bool RenameTo(newPath Path) error ReadFile() ([]byte, error) WriteFile(data []byte, perm fs.FileMode) error }
func EvalSymlinks ¶
func ExpandHome ¶
func InsBeforeExt ¶
type ProcessFunc ¶
type RelPath ¶
type RelPath struct {
// contains filtered or unexported fields
}
func (RelPath) CreateForced ¶
func (RelPath) EvalSymlinks ¶
func (RelPath) ExpandHome ¶
func (p RelPath) ExpandHome() Path
func (RelPath) InsBeforeExt ¶
type ShouldSkipFunc ¶
func ShouldSkip ¶
func ShouldSkip(excludeRXs ...Glob) ShouldSkipFunc
Click to show internal directories.
Click to hide internal directories.