Canonicalize the parent path, leaving the filename (last component) unchanged. You may use this before creating a file instead of boost::filesystem::canonical, which requires that the entire path exists.
Declared in <folly/io/FsUtil.h>
path
canonical_parent(
path const& p,
path const& basePath = current_path());
The path with its parent canonicalized.
| Name | Description |
|---|---|
| p | The path whose parent is canonicalized. |
| basePath | The base used to resolve relative paths. |