diskfile_helpers.ts view source
(disknode: { id: string & $brand<"DiskfilePath">; source_dir: string & $brand<"DiskfilePath"> & $brand<"DiskfileDirectoryPath">; contents: string | null; ctime: number | null; mtime: number | null; dependents: [...][]; dependencies: [...][]; }, existing_id?: string & $brand<...>): { ...; } Helper function to convert a SerializableDisknode to the DiskfileJson format.
disknode
The source file to convert
type
{ id: string & $brand<"DiskfilePath">; source_dir: string & $brand<"DiskfilePath"> & $brand<"DiskfileDirectoryPath">; contents: string | null; ctime: number | null; mtime: number | null; dependents: [...][]; dependencies: [...][]; }existing_id
Optional existing UUID to preserve id stability across updates
type
string & $brand<"Uuid"> default
create_uuid()returns
{ id: string & $brand<"Uuid">; created: string & $brand<"Datetime">; updated: string & $brand<"Datetime">; path: (string & $brand<"DiskfilePath">) | null; source_dir: string & ... 1 more ... & $brand<...>; content: string | null; dependents: [...][] | null; dependencies: [...][] | null; }