Documentation
¶
Overview ¶
Package pathutil implements utilities for handing file paths.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddExtPrefix ¶
AddExtPrefix adds a prefix to the path's file extension and returns a new path.
For example: AddExtPrefix("foo/bar/baz.js", ".bak") = "foo/bar/baz.bak.js"
func Copy ¶
Copy copies the file from a source path to a destination path, overwriting the destination if it already exists.
func SubstituteHomeAndXdg ¶
SubstituteHomeDir takes a path that might be prefixed with `~`, or may contain XDG variables, and substitutes them with the appropriate path.
func SubstituteHomeDir ¶
SubstituteHomeDir takes a path that might be prefixed with `~`, and returns the path with the `~` replaced by the user's home directory.
When running inside a Flatpak, we use executil.Command to fetch $HOME from the host system.
Types ¶
This section is empty.