R3m/framework Function reference file.basename

{file.basename(String $url, String $extension)}

{file.basename()} — Returns trailing name component of path

Given a string containing the path to a file or directory, this function will return the trailing name component.


{file.basename()} operates naively on the input string, and is not aware of the actual filesystem, or path components such as "..".

Returns the base name of the given path.

More information:


Last modified: 2021-06-07

© 2021 universeorange.com