Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalPath ¶ added in v0.1.3
CanonicalPath converts path to an absolute path and follows all symlinks (if any). If path doesn't exist, no parent symlinks are followed.
func Cleanup ¶
func Cleanup(path string)
Cleanup removes the specified file or directory and prints any errors to stderr. It's supposed to be used in defer statements to clean up temporary directories.
func IsBelow ¶
IsBelow returns true if and only if path lies below or is the path root. path and root must be either both absolute or both relative.
func IsDir ¶
IsDir returns whether this path is a directory. Tries to behave the same as Python's pathlib.Path.is_dir()
func PrettifyPath ¶
PrettifyPath prints a possibly shortened path for display purposes. If path is located under the current working directory, the relative path to it is returned, otherwise or in case of an error the path is returned unchanged.
Types ¶
This section is empty.