Skip to main content

tree_path_at

Function tree_path_at 

Source
pub fn tree_path_at(root: &Path, path: &Path) -> Result<String, NodeError>
Expand description

The path in the tree at root of what is at path, a full path, whether or not it is there: its folder as the file system resolves the part of it that is there, and the rest as written, relative to the root; empty for the root itself.

§Errors

Returns NodeError::NotInTree if the path is not in the tree’s folder, and NodeError::UnsafePath if it is no path a tree may hold.