Skip to content

FileRepackedPort

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

The same store’s four files in an ordinary DIRECTORY, over node:fs. The port a build step uses: a host under Node or Bun fills a store where the bytes are ordinary files, ships those four files, and a browser’s OpfsRepackedPort opens them as the same store — the format lives above the port, so neither side learns which one it is on. node:fs is imported lazily so the browser bundle can carry this module without a static node: import being compiled to nothing (see ./file-port).

new FileRepackedPort(directory): FileRepackedPort

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

string

The directory this store owns in full. It is created on first use, with every parent, exactly as the OPFS port’s caller creates its directory handle with create: true.

FileRepackedPort

get directory(): string

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

The directory this port reads and writes. Absolute or relative, exactly as it was given.

string

acquire(name, _label): Promise<RepackedFileHandle>

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

"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/file-port.ts:93

string

Promise<readonly RepackedPortEntry[]>

RepackedPort.enumerate