pub unsafe extern "C" fn tsk_tree_preorder_from(
    self_: *const tsk_tree_t,
    root: tsk_id_t,
    nodes: *mut tsk_id_t,
    num_nodes: *mut tsk_size_t
) -> c_int
Expand description

@brief Fill an array with the nodes of this tree starting from a particular node.

@rst As for :c:func:tsk_tree_preorder but starting the traversal at a particular node (which will be the first node in the traversal list). The :ref:virtual root<sec_data_model_tree_roots> is a valid input for this function and will be treated like any other tree node. The value -1 is a special case, in which we visit all nodes reachable from the roots, and equivalent to calling :c:func:tsk_tree_preorder.

See :c:func:tsk_tree_preorder for details the requirements for the nodes array. @endrst

@param self A pointer to a tsk_tree_t object. @param root The root of the subtree to traverse, or -1 to visit all nodes. @param nodes The tsk_id_t array to store nodes in. @param num_nodes A pointer to a tsk_size_t value where we store the number of nodes in the traversal. @return 0 on success or a negative value on failure.