Path semantics

These rules make path interpretation identical across implementations:

  • A path is split on /; empty components and "." are dropped.
  • A ".." component MUST be rejected (blocks form a DAG; there are no parent pointers, and upward traversal is unsupported by construction).
  • The empty path resolves to the starting entry itself.
  • Resolution starts from a dag-cbor-codec ref: at an "r" node, the start entry is its e; at a "d" node, the start entry is the synthetic entry {t: "d", r: <that ref>}. Any other node type is an error.
  • Every intermediate component MUST resolve to a "d" entry. An intermediate symlink is an error (implementations layered on top may implement symlink following; the base resolution never does). Any other intermediate type is a "not a directory" error.
  • The final component's entry is returned as-is; symlinks are not followed.

Byte-range reads of a file walk only the "f"-node subtrees overlapping the requested range; with the tree shape of §9 this touches O(range / chunk size) blocks plus the spine.

unfs  A filesystem you can put in any key–value store.