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.
Implements
Section titled “Implements”Methods
Section titled “Methods”assertHealthy()
Section titled “assertHealthy()”assertHealthy():
void
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:274
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”RepackedFileSystem.assertHealthy
chmod()
Section titled “chmod()”chmod(
requestPath,mode,nowMs):void
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:743
Parameters
Section titled “Parameters”requestPath
Section titled “requestPath”string
number
bigint
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”cleanupFailedInit()
Section titled “cleanupFailedInit()”cleanupFailedInit():
void
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:284
Returns
Section titled “Returns”void
close()
Section titled “close()”Call Signature
Section titled “Call Signature”close():
void
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:799
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Call Signature
Section titled “Call Signature”close(
fd):void
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:800
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”fail()
Section titled “fail()”fail(
cause):never
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:278
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”never
Implementation of
Section titled “Implementation of”fstat()
Section titled “fstat()”fstat(
fd):RepackedStat
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:651
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”lstat()
Section titled “lstat()”lstat(
requestPath):RepackedStat
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:427
Reports the LINK itself when the final component is one.
Parameters
Section titled “Parameters”requestPath
Section titled “requestPath”string
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”metrics()
Section titled “metrics()”metrics():
RepackedVfsMetrics
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:292
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”mkdir()
Section titled “mkdir()”mkdir(
requestPath,options):void
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:456
Parameters
Section titled “Parameters”requestPath
Section titled “requestPath”string
options
Section titled “options”number
bigint
recursive?
Section titled “recursive?”boolean
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”open()
Section titled “open()”open(
requestPath,flags?,mode?,nowMs?):number
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:621
Parameters
Section titled “Parameters”requestPath
Section titled “requestPath”string
flags?
Section titled “flags?”string = "r"
number = 0o100666
nowMs?
Section titled “nowMs?”bigint = 0n
Returns
Section titled “Returns”number
Implementation of
Section titled “Implementation of”read()
Section titled “read()”read(
fd,buffer,offset,length,position?):number
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:658
Parameters
Section titled “Parameters”number
buffer
Section titled “buffer”Uint8Array
offset
Section titled “offset”number
length
Section titled “length”number
position?
Section titled “position?”bigint
Returns
Section titled “Returns”number
Implementation of
Section titled “Implementation of”readdir()
Section titled “readdir()”readdir(
requestPath):string[]
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:448
Parameters
Section titled “Parameters”requestPath
Section titled “requestPath”string
Returns
Section titled “Returns”string[]
Implementation of
Section titled “Implementation of”readFile()
Section titled “readFile()”readFile(
requestPath):Uint8Array
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:565
Parameters
Section titled “Parameters”requestPath
Section titled “requestPath”string
Returns
Section titled “Returns”Uint8Array
Implementation of
Section titled “Implementation of”readlink()
Section titled “readlink()”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.
Parameters
Section titled “Parameters”requestPath
Section titled “requestPath”string
Returns
Section titled “Returns”string
Implementation of
Section titled “Implementation of”rename()
Section titled “rename()”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.
Parameters
Section titled “Parameters”oldRequestPath
Section titled “oldRequestPath”string
newRequestPath
Section titled “newRequestPath”string
bigint
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”repack()
Section titled “repack()”repack(
reason?):void
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:310
Parameters
Section titled “Parameters”reason?
Section titled “reason?”RepackReason = "manual"
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”resolvePath()
Section titled “resolvePath()”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.
Parameters
Section titled “Parameters”string
follow?
Section titled “follow?”boolean = true
Returns
Section titled “Returns”string
Implementation of
Section titled “Implementation of”RepackedFileSystem.resolvePath
rmdir()
Section titled “rmdir()”rmdir(
requestPath,nowMs):void
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:771
Parameters
Section titled “Parameters”requestPath
Section titled “requestPath”string
bigint
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”runScheduledRepack()
Section titled “runScheduledRepack()”runScheduledRepack(
nowMs?):boolean
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:389
Parameters
Section titled “Parameters”nowMs?
Section titled “nowMs?”number = ...
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”RepackedFileSystem.runScheduledRepack
stat()
Section titled “stat()”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.
Parameters
Section titled “Parameters”requestPath
Section titled “requestPath”string
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”strictSync()
Section titled “strictSync()”strictSync():
void
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:256
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”symlink()
Section titled “symlink()”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.
Parameters
Section titled “Parameters”target
Section titled “target”string
requestPath
Section titled “requestPath”string
bigint
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”truncate()
Section titled “truncate()”truncate(
requestPath,size,nowMs):void
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:575
Parameters
Section titled “Parameters”requestPath
Section titled “requestPath”string
bigint
bigint
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”unlink()
Section titled “unlink()”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.
Parameters
Section titled “Parameters”requestPath
Section titled “requestPath”string
bigint
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”utimes()
Section titled “utimes()”utimes(
requestPath,atimeMs,mtimeMs,ctimeMs):void
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:748
Parameters
Section titled “Parameters”requestPath
Section titled “requestPath”string
atimeMs
Section titled “atimeMs”bigint
mtimeMs
Section titled “mtimeMs”bigint
ctimeMs
Section titled “ctimeMs”bigint
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”write()
Section titled “write()”write(
fd,buffer,offset,length,position,nowMs):number
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:672
Parameters
Section titled “Parameters”number
buffer
Section titled “buffer”Uint8Array
offset
Section titled “offset”number
length
Section titled “length”number
position
Section titled “position”bigint | undefined
bigint
Returns
Section titled “Returns”number
Implementation of
Section titled “Implementation of”writeFile()
Section titled “writeFile()”writeFile(
requestPath,data,options):void
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:463
Parameters
Section titled “Parameters”requestPath
Section titled “requestPath”string
string | Uint8Array<ArrayBufferLike>
options
Section titled “options”encoding?
Section titled “encoding?”string
string
number
bigint
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”open()
Section titled “open()”
staticopen(port,options?):Promise<RepackedVfs>
Defined in: packages/pgwasm/src/opfs/core/repacked-vfs.ts:252
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”Promise<RepackedVfs>