Skip to main content

scope_target_is_folder

Function scope_target_is_folder 

Source
pub async fn scope_target_is_folder(
    meta: &Arc<dyn MetaAdapter>,
    cache: &DirCache,
    tn_id: TnId,
    scope_file_id: &str,
) -> ClResult<bool>
Expand description

Return true if the scoped target file is a folder (file_tp == "FLDR").

Used to gate the folder-subtree extension of a file-scope token: only a scope whose target is an actual folder grants access across its parent_id descendants. Answered straight from the folder cache via resolve_dir_entry: returns Ok(true) only for an existing FLDR row, Ok(false) for a missing or non-folder row, and Err for a genuine read fault so request-path callers that can return 5xx surface the fault instead of masking it as “not a folder”.