parent

Undocumented in source. Be warned that the author may not have intended to support it.
parent
(
PathType
)
(
auto ref in PathType p
)
if (
isSomePath!PathType
)

Examples

assertEqual(Path().parent, Path());
assertEqual(Path("IHaveNoParents").parent, Path());
assertEqual(WindowsPath("C:/hello/world").parent, WindowsPath(`C:\hello`));
assertEqual(WindowsPath("C:/hello/world/").parent, WindowsPath(`C:\hello`));
assertEqual(WindowsPath("C:/hello/world.exe.foo").parent, WindowsPath(`C:\hello`));
assertEqual(PosixPath("/hello/world").parent, PosixPath("/hello"));
assertEqual(PosixPath("/hello/\\ world/").parent, PosixPath("/hello"));
assertEqual(PosixPath("/hello.foo.bar/world/").parent, PosixPath("/hello.foo.bar"));

Meta