Documentation ¶
Overview ¶
Package cmpath is a library dedicated specifically to handling paths in a Nomos repository in a type safe way. It is not a generalized path library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Absolute ¶
type Absolute string
Absolute represents an absolute path on a file system. The path is slash-delimited, but can be converted into the os-specific representation.
func AbsoluteOS ¶
AbsoluteOS returns an Absolute path from an OS-specific path.
Converts p to an absolute path if it is not already. Assumes the current working directory is the path p is relative to.
func AbsoluteSlash ¶
AbsoluteSlash returns an Absolute path from a slash-delimited path.
It is an error to pass a non-absolute path.
func (Absolute) EvalSymlinks ¶
EvalSymlinks evaluates any symlinks in the Absolute and returns a new Absolute with no symlinks.
type Relative ¶
type Relative string
Relative represents a relative path on a file system. The path is slash-delimited, but can be converted into the os-specific representation. The path is not guaranteed to be relative to the current working directory.
func RelativeOS ¶
RelativeOS returns an Relative path from an OS-specific path.
func RelativeSlash ¶
RelativeSlash returns an Relative path from a slash-delimited path.