name

The name of the path without any of its parents.

name
(
PathType
)
(
auto ref in PathType p
)

Examples

assertEqual(Path().name, ".");
assertEqual(Path("").name, ".");
assertEmpty(Path("/").name);
assertEqual(Path("/hello").name, "hello");
assertEqual(Path("C:\\hello").name, "hello");
assertEqual(Path("C:/hello/world.exe").name, "world.exe");
assertEqual(Path("hello/world.foo.bar.exe").name, "world.foo.bar.exe");

Meta