Path
Config & IO
Filesystem path string helpers for the BEAM target.
These operate on path strings the same way OTP filename does — they do not touch the filesystem. Use File for reads, writes, and directory listing.
Values
join
join : String -> String -> StringJoin two path segments with the platform separator.
Examples
Path.join "static" "app.js"joinAll
joinAll : List String -> StringJoin path segments left-to-right.
Examples
Path.joinAll [ "priv", "static", "app.js" ]dirname
dirname : String -> StringParent directory of path (. when there is none).
Examples
Path.dirname "/tmp/app.js"basename
basename : String -> StringFinal component of path.
Examples
Path.basename "/tmp/app.js"extension
extension : String -> StringExtension without the leading . (empty string when none).
Examples
Path.extension "app.js"dropExtension
dropExtension : String -> StringPath with the final extension removed.
Examples
Path.dropExtension "app.js"isAbsolute
isAbsolute : String -> BoolTrue when path is absolute on this host.
Examples
Path.isAbsolute "/tmp"