std::filesystem::path::filename (3) - Linux Manuals
std::filesystem::path::filename: std::filesystem::path::filename
NAME
std::filesystem::path::filename - std::filesystem::path::filename
Synopsis
path filename() const; (since C++17)
Returns the generic-format filename component of the path.
Equivalent to relative_path().empty() ? path() : *--end().
Parameters
(none)
Return value
The filename identified by the path.
Exceptions
(none)
Example
// Run this code
Possible output:
See also
extension (public member function)
stem (public member function)
replace_filename (public member function)
has_filename (public member function)