Path.rootname
You're seeing just the function
rootname
, go back to Path module for more information.
Specs
Returns the path
with the extension
stripped.
Examples
iex> Path.rootname("/foo/bar")
"/foo/bar"
iex> Path.rootname("/foo/bar.ex")
"/foo/bar"
Specs
Returns the path
with the extension
stripped.
This function should be used to remove a specific extension which may or may not be there.
Examples
iex> Path.rootname("/foo/bar.erl", ".erl")
"/foo/bar"
iex> Path.rootname("/foo/bar.erl", ".ex")
"/foo/bar.erl"