Skip to content

RepackedSyncClient

Defined in: packages/pgwasm/src/opfs/broker/client.ts:167

new RepackedSyncClient(channel, options?): RepackedSyncClient

Defined in: packages/pgwasm/src/opfs/broker/client.ts:173

RepackedChannel

RepackedSyncClientOptions = {}

RepackedSyncClient

readonly channel: RepackedChannel

Defined in: packages/pgwasm/src/opfs/broker/client.ts:168

get maxTransferBytes(): number

Defined in: packages/pgwasm/src/opfs/broker/client.ts:182

The largest single read or write that fits one request. Reads/writes above it are chunked.

number

close(fd): BrokerResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:195

number

BrokerResult


fstat(fd): BrokerStatResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:275

number

BrokerStatResult


fsync(fd?): BrokerResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:266

Flush the store. Durability is STORE-WIDE, not per-descriptor: on success every byte written through this broker by any client before the call returned is recoverable. fd is validated so the call still rejects a descriptor this client does not own.

number

BrokerResult


lstat(path): BrokerStatResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:284

Reports the LINK itself when the final component is one; stat follows it instead.

string

BrokerStatResult


mkdir(path, options?): BrokerResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:340

string

number

boolean

BrokerResult


open(path, flags, mode?): BrokerOpenResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:186

string

number

number = 0o100666

BrokerOpenResult


read(fd, length, position?): BrokerReadResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:204

Read up to length bytes. With no position the store’s own descriptor cursor is used and advances; with a position the cursor is untouched (fd_pread). A result shorter than length means end-of-file, never a partial transport.

number

number

bigint

BrokerReadResult


readdir(path): BrokerReaddirResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:309

The complete listing, paged transparently over as many requests as the channel needs.

string

BrokerReaddirResult


readdirPage(path, cursor?): BrokerReaddirPageResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:326

One page of a listing, for a caller that owns its own cookie (WASI fd_readdir). The cursor is an index into the store’s sorted listing, recomputed per call — a paged listing is therefore not an atomic snapshot, which is exactly what POSIX readdir allows.

string

number = 0

BrokerReaddirPageResult


readlink(path): BrokerReadlinkResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:302

The target of the symbolic link at path. EINVAL when the path is not a link.

string

BrokerReadlinkResult


rename(oldPath, newPath): BrokerResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:358

string

string

BrokerResult


rmdir(path): BrokerResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:350

string

BrokerResult


size(path): BrokerSizeResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:383

The size of one file, without the rest of a stat. EISDIR for a directory.

string

BrokerSizeResult


stat(path): BrokerStatResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:279

string

BrokerStatResult


symlink(target, path): BrokerResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:292

Create a symbolic link at path pointing at target. Targets are ABSOLUTE — the store refuses a relative one with EINVAL rather than reinterpreting it against the link’s directory.

string

string

BrokerResult


truncate(path, size): BrokerResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:373

Resize by PATH. The core store has no resize-by-descriptor, so a WASI fd_filestat_set_size adapter keeps the path each fd was opened with and calls this. Nothing is lost by that: the store has no hard links, and a descriptor whose path was unlinked meanwhile is an orphan the core keeps readable but no longer resizes.

string

bigint

BrokerResult


unlink(path): BrokerResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:354

string

BrokerResult


write(fd, bytes, position?): BrokerCountResult

Defined in: packages/pgwasm/src/opfs/broker/client.ts:237

Write bytes. With no position the store’s own descriptor cursor is used and advances; with a position the cursor is untouched (fd_pwrite). A descriptor opened with O_APPEND always writes at end-of-file and ignores position, exactly as POSIX requires.

number

Uint8Array

bigint

BrokerCountResult