Skip to main content

build_org_collections

Function build_org_collections 

Source
fn build_org_collections(
    names: Vec<String>,
    organization_id: OrganizationId,
    target: Option<(CollectionId, &str)>,
) -> (Vec<CollectionView>, usize)
Expand description

Builds the collection views for an org import, plus the count of collections actually parsed from the source (excluding the injected target) — mirrors build_personal_folders, but for collections. When a target is given it becomes collection 0 and parsed groups are nested beneath it as "{target}/{group}"; with no target, every group becomes a brand-new top-level collection (submitted with no id, same as build_personal_folders submits new folders with no id — the server creates on an unmatched/empty id).