Skip to content

OpfsDirectoryHandle

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

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.

getFileHandle(name, options?): Promise<OpfsFileHandle>

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

string

boolean

Promise<OpfsFileHandle>


values(): AsyncIterable<OpfsDirectoryEntry>

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

AsyncIterable<OpfsDirectoryEntry>