Say we have a filesystem::path pointing at a directory /fo/bar/
.
How do i best get a path pointing to /fo
?
Note: The path::parent_path() is not sufficient here. It does only go back to the directory, but if the path is already pointing at a directory it does nothing.
Note2: It seems like my problem was something like leaving a slash in the pathname, when trying without it works as expected. Nice.