fs_resolve_path

Function fs_resolve_path 

Source
pub fn fs_resolve_path<G>(
    graph: &G,
    dir: NodeId,
    path: impl AsRef<[u8]>,
) -> Result<Option<NodeId>>
Expand description

Given a graph and a directory node, return the node id of a directory entry located at a given path within that directory, if it exists.

Slashes (/) contained in path are interpreted as path separators.

See fs_resolve_name for a non-recursive version of this function.

if let Ok(Some(node)) == fs_resolve_path(&graph, 42, "src/main.c") {
    // do something with node
}