Skip to main content

docs_tree

Function docs_tree 

Source
pub fn docs_tree(
    store: &Store,
    repo_id: &str,
    path: Option<&str>,
    depth: Option<i64>,
    files: bool,
    updated: bool,
    limit: Option<i64>,
    cursor: Option<&str>,
    budget_tokens: Option<usize>,
) -> Result<Value>
Expand description

§2 docs_tree (5.1): { prefix, depth, total, files_here, entries, truncated, cursor } — the directory rollup. Every directory within depth segments under the prefix is one entry { _path (ending /), docs, blocks } (the totals beneath it; a nested directory after its parent in path order); the documents directly in the prefix are counted as files_here, never listed. With files the documents within depth are listed too, as { _id, _path, blocks }; with updated every entry gains _updated_at (a directory’s the latest beneath it). The tree is built over the storage form and rooted on the way out, so the prefix (/ for the root), the entries and the cursor all speak the reference form (§1 “Paths”).