Path.rootname

You're seeing just the function rootname, go back to Path module for more information.

Specs

rootname(t()) :: binary()

Returns the path with the extension stripped.

Examples

iex> Path.rootname("/foo/bar")
"/foo/bar"

iex> Path.rootname("/foo/bar.ex")
"/foo/bar"
Link to this function

rootname(path, extension)

View Source

Specs

rootname(t(), t()) :: binary()

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"