spin_common::paths

Function parent_dir

Source
pub fn parent_dir(path: impl AsRef<Path>) -> Result<PathBuf>
Expand description

Resolves the parent directory of a path, returning an error if the path has no parent. A path with a single component will return “.”.