Path.join
You're seeing just the function
join
, go back to Path module for more information.
Specs
Joins a list of paths.
This function should be used to convert a list of paths to a path. Note that any trailing slash is removed when joining.
Examples
iex> Path.join(["~", "foo"])
"~/foo"
iex> Path.join(["foo"])
"foo"
iex> Path.join(["/", "foo", "bar/"])
"/foo/bar"
Specs
Joins two paths.
The right path will always be expanded to its relative format and any trailing slash will be removed when joining.
Examples
iex> Path.join("foo", "bar")
"foo/bar"
iex> Path.join("/foo", "/bar/")
"/foo/bar"
The functions in this module support chardata, so giving a list will treat it as a single entity:
iex> Path.join("foo", ["bar", "fiz"])
"foo/barfiz"
iex> Path.join(["foo", "bar"], "fiz")
"foobar/fiz"