Skip to content

OpfsRepackedPort

Defined in: packages/pgwasm/src/opfs/opfs-port.ts:27

The OPFS-backed port for that same store core: four FileSystemSyncAccessHandles over one dedicated OPFS directory. createOpfsPgwasm builds this internally, so a pgwasm consumer never needs it; it is exported for a host that owns the store itself — a coordinator worker serving the sync broker to a wasm engine — and wants that store persisted rather than in memory. It must be constructed in a scope where createSyncAccessHandle() actually SUCCEEDS (a dedicated worker in every engine, plus a SharedWorker on real Safari); method presence is not proof, the window main thread is never such a scope, and a denial surfaces as an open failure rather than a fallback. OpfsDirectoryHandle is the structural slice of FileSystemDirectoryHandle the port actually uses, so a real handle satisfies it without a cast.

new OpfsRepackedPort(directory): OpfsRepackedPort

Defined in: packages/pgwasm/src/opfs/opfs-port.ts:30

OpfsDirectoryHandle

OpfsRepackedPort

acquire(name, _label): Promise<RepackedFileHandle>

Defined in: packages/pgwasm/src/opfs/opfs-port.ts:42

"arena.bin" | "metadata-a.bin" | "metadata-b.bin" | "activation.bin"

string

Promise<RepackedFileHandle>

RepackedPort.acquire


enumerate(_label): Promise<readonly RepackedPortEntry[]>

Defined in: packages/pgwasm/src/opfs/opfs-port.ts:34

string

Promise<readonly RepackedPortEntry[]>

RepackedPort.enumerate