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).
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new FileRepackedPort(
directory):FileRepackedPort
Defined in: packages/pgwasm/src/opfs/file-port.ts:83
Parameters
Section titled “Parameters”directory
Section titled “directory”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.
Returns
Section titled “Returns”FileRepackedPort
Accessors
Section titled “Accessors”directory
Section titled “directory”Get Signature
Section titled “Get Signature”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.
Returns
Section titled “Returns”string
Methods
Section titled “Methods”acquire()
Section titled “acquire()”acquire(
name,_label):Promise<RepackedFileHandle>
Defined in: packages/pgwasm/src/opfs/file-port.ts:104
Parameters
Section titled “Parameters”"arena.bin" | "metadata-a.bin" | "metadata-b.bin" | "activation.bin"
_label
Section titled “_label”string
Returns
Section titled “Returns”Promise<RepackedFileHandle>
Implementation of
Section titled “Implementation of”enumerate()
Section titled “enumerate()”enumerate(
_label):Promise<readonlyRepackedPortEntry[]>
Defined in: packages/pgwasm/src/opfs/file-port.ts:93
Parameters
Section titled “Parameters”_label
Section titled “_label”string
Returns
Section titled “Returns”Promise<readonly RepackedPortEntry[]>