Documentation ¶
Index ¶
- func DotRelative(base, full string) string
- func Exist(name string) error
- func Invalid(name string) error
- func IsDir(name string) error
- func IsNotExist(err error) bool
- func IsParent(short, long string) bool
- func NotAbs(name string) error
- func NotDir(name string) error
- func NotExist(name string) error
- func ReadOnly(name string) error
- func Relative(base, full string) string
- func Split(path string) ([]string, error)
- func ValidPath(p string) bool
- func ValidPathRune(r rune) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DotRelative ¶
DotRelative returns the relative path of full to base. The return value starts with a dot if base is a parent of full. It returns full unchanged if base is not a parent of full.
func IsNotExist ¶
IsNotExist returns true if the error means that a path does not exist as a file. It could be that the file is a directory/tree.
func Relative ¶
Relative returns the relative path of full to base. It returns the relative path if base is a parent of full. It returns a single dot if base and full are the same. It retunrs an empty string if base is not a parent of full.
func ValidPathRune ¶
ValidPathRune checks if r is a valid rune in the path. Valid runes contains a-z, A-Z, 0-9, '_' and '.'
Types ¶
This section is empty.