db/file_fact_url.ts view source
(hash: string & $brand<"FactHash">): { shard: string; rest: string; } import {fact_disk_path} from '@fuzdev/fuz_app/db/file_fact_url.js'; Split a FactHash into its on-disk <shard>/<rest> parts — the first 2
hex chars of the digest (shard subdir) + the remaining 62. The single
source of truth for the disk layout, so the write path (put /
put_stream) and the URL minted into the fact row can't disagree.
Mirrors the Rust fact_disk_path in fuz_fact.
hash
string & $brand<"FactHash">returns
{ shard: string; rest: string; }