Skip to main content

Content Manager - Folders

Folder overview

Folder represents a virtual folder info

Key features

Folder metadata

  • Name is an mandatory folder name
  • ParentId is an optional identification of the parent folder. If null, then the folder exists at the root level of the virtual file system.

Endpoints

Ensure

  • POST /api/v1/folders/ensure/path/{path}

Guarantees that a folder path exists. If missing, the handler creates all necessary folders, using cache for performance and enforcing user permissions.

  • Access level resolution:

    • Auto → Private, otherwise keep provided.
    • Selects correct repository (Private / Public).
  • Optimistic lookup:

    • Try to find folder via repo/cache (TryGetFolderByPathUsingAutodetect).
    • If found → check Read permission → return Id.
  • Path traversal & creation:

    • Split path into segments, search backwards for nearest existing parent.
    • Missing segments stored in a stack.
    • Create missing folders top-down using memory cache.
    • Save to repo and update cache.
  • Permissions:

    • On parent folder → check Update permission.
    • If a there are created folders on provided path → permissions are assigned only to the last one.