Reference · reference
path module
use path manipulates path strings without touching the filesystem. Every function is pure and uses the separator of the platform the script runs on. Only absolutize can fail, because it reads the current directory; it returns Result[string, string]. Use the fs module to read or write what a path names.
join
join Joins two segments with the platform separator.
parent
parent Returns the parent directory of a path. At the root it returns the empty string.
filename
filename Returns the final component of a path.
extension
extension Returns the extension of the final component without the dot, or the empty string when there is none.
normalize
normalize Resolves . and .. components lexically. It does not consult the filesystem, so symlinks are not followed.
absolutize
absolutize
Makes a path absolute against the current directory, then normalizes it.
use path
let conf = join
let ext = extension // "conf"
let dir = parent // "/etc/app"