Skip to main content

resolve_tree_path

Function resolve_tree_path 

Source
pub fn resolve_tree_path<S>(
    store: &S,
    root: &ContentHash,
    path: &Path,
    policy: LeafPolicy,
) -> Result<Option<ResolvedTreeTarget>, TreePathResolveError>
where S: ObjectSource,
Expand description

Walk path from root through nested subtrees and resolve the terminal entry according to policy.

Ok(None) means the path is absent or terminates at the wrong entry type for the policy. Referenced objects must exist for every policy; missing trees and blobs return errors instead of masquerading as absent paths.