Skip to content

RepackedVfs

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:226

The file surface of a repacked store, as a TYPE.

RepackedVfs is the one-store implementation; MountedRepackedVfs is a composite of several. Everything that takes a store — the sync broker above all — takes this, so a host can hand it either without the two knowing about each other.

assertHealthy(): void

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:274

void

RepackedFileSystem.assertHealthy


chmod(requestPath, mode, nowMs): void

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:743

string

number

bigint

void

RepackedFileSystem.chmod


cleanupFailedInit(): void

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:284

void


close(): void

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:799

void

RepackedFileSystem.close

close(fd): void

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:800

number

void

RepackedFileSystem.close


fail(cause): never

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:278

unknown

never

RepackedFileSystem.fail


fstat(fd): RepackedStat

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:651

number

RepackedStat

RepackedFileSystem.fstat


lstat(requestPath): RepackedStat

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:427

Reports the LINK itself when the final component is one.

string

RepackedStat

RepackedFileSystem.lstat


metrics(): RepackedVfsMetrics

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:292

RepackedVfsMetrics

RepackedFileSystem.metrics


mkdir(requestPath, options): void

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:456

string

number

bigint

boolean

void

RepackedFileSystem.mkdir


open(requestPath, flags?, mode?, nowMs?): number

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:621

string

string = "r"

number = 0o100666

bigint = 0n

number

RepackedFileSystem.open


read(fd, buffer, offset, length, position?): number

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:658

number

Uint8Array

number

number

bigint

number

RepackedFileSystem.read


readdir(requestPath): string[]

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:448

string

string[]

RepackedFileSystem.readdir


readFile(requestPath): Uint8Array

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:565

string

Uint8Array

RepackedFileSystem.readFile


readlink(requestPath): string

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:440

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

string

string

RepackedFileSystem.readlink


rename(oldRequestPath, newRequestPath, nowMs): void

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:777

Renames the entry itself: a symbolic link moves as a link, and its target is never followed.

string

string

bigint

void

RepackedFileSystem.rename


repack(reason?): void

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:310

RepackReason = "manual"

void

RepackedFileSystem.repack


resolvePath(path, follow?): string

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:415

The link-free absolute path path names, without touching anything. A composite VFS resolves across a mount boundary with it: this store answers for the part of the path it holds, stops at the first component it does not have, and carries the rest through verbatim.

string

boolean = true

string

RepackedFileSystem.resolvePath


rmdir(requestPath, nowMs): void

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:771

string

bigint

void

RepackedFileSystem.rmdir


runScheduledRepack(nowMs?): boolean

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:389

number = ...

boolean

RepackedFileSystem.runScheduledRepack


stat(requestPath): RepackedStat

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:421

Follows a symbolic link on the final component; every intermediate link is always followed.

string

RepackedStat

RepackedFileSystem.stat


strictSync(): void

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:256

void

RepackedFileSystem.strictSync


symlink(target, requestPath, nowMs): void

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:433

Create a symbolic link at path pointing at the ABSOLUTE target. The target is not read.

string

string

bigint

void

RepackedFileSystem.symlink


truncate(requestPath, size, nowMs): void

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:575

string

bigint

bigint

void

RepackedFileSystem.truncate


unlink(requestPath, nowMs): void

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:755

Removes a file or a SYMBOLIC LINK. The final component is never followed.

string

bigint

void

RepackedFileSystem.unlink


utimes(requestPath, atimeMs, mtimeMs, ctimeMs): void

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:748

string

bigint

bigint

bigint

void

RepackedFileSystem.utimes


write(fd, buffer, offset, length, position, nowMs): number

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:672

number

Uint8Array

number

number

bigint | undefined

bigint

number

RepackedFileSystem.write


writeFile(requestPath, data, options): void

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:463

string

string | Uint8Array<ArrayBufferLike>

string

string

number

bigint

void

RepackedFileSystem.writeFile


static open(port, options?): Promise<RepackedVfs>

Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:252

RepackedPort

RepackedVfsOpenOptions = {}

Promise<RepackedVfs>