Path.expand
You're seeing just the function
expand, go back to Path module for more information.
Specs
Converts the path to an absolute one and expands
any . and .. characters and a leading ~.
Examples
Path.expand("/foo/bar/../baz")
#=> "/foo/baz"
Specs
Expands the path relative to the path given as the second argument
expanding any . and .. characters.
If the path is already an absolute path, relative_to is ignored.
Note that this function treats a path with a leading ~ as
an absolute one.
The second argument is first expanded to an absolute path.
Examples
# Assuming that the absolute path to baz is /quux/baz
Path.expand("foo/bar/../bar", "baz")
#=> "/quux/baz/foo/bar"
Path.expand("foo/bar/../bar", "/baz")
#=> "/baz/foo/bar"
Path.expand("/foo/bar/../bar", "/baz")
#=> "/foo/bar"