EmscriptenFS
Defined in: src/backend.ts:29
Mounts an Emscripten file system into the ZenFS file system.
Extends
Section titled “Extends”AsyncFSMethods<this> &FileSystem<this>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new EmscriptenFS(
em):EmscriptenFS
Defined in: src/backend.ts:30
Parameters
Section titled “Parameters”typeof FS
The Emscripten FS
Returns
Section titled “Returns”EmscriptenFS
Overrides
Section titled “Overrides”Sync(FileSystem).constructor
Properties
Section titled “Properties”_mountPoint?
Section titled “_mountPoint?”
protectedoptional_mountPoint?:string
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:143
Internal
The last place this file system was mounted
Inherited from
Section titled “Inherited from”Sync(FileSystem)._mountPoint
protected_uuid:`${string}-${string}-${string}-${string}-${string}`
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:149
Internal
The UUID of the file system.
Inherited from
Section titled “Inherited from”Sync(FileSystem)._uuid
attributes
Section titled “attributes”
readonlyattributes:ConstMap<FileSystemAttributes, keyofFileSystemAttributes,void|CaseFold|undefined> &Map<string,any>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:154
FileSystemAttributes
Inherited from
Section titled “Inherited from”Sync(FileSystem).attributes
protectedem: typeofFS
Defined in: src/backend.ts:34
The Emscripten FS
label?
Section titled “label?”
optionallabel?:string
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:138
Inherited from
Section titled “Inherited from”Sync(FileSystem).label
readonlyname:string
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:137
The name for this file system. For example, tmpfs for an in memory one
Inherited from
Section titled “Inherited from”Sync(FileSystem).name
readonlytype:number
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:132
A unique ID for this kind of file system. Currently unused internally, but could be used for partition tables or something
Inherited from
Section titled “Inherited from”Sync(FileSystem).type
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get uuid():
`${string}-${string}-${string}-${string}-${string}`
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:150
Returns
Section titled “Returns”`${string}-${string}-${string}-${string}-${string}`
Inherited from
Section titled “Inherited from”Sync(FileSystem).uuid
Methods
Section titled “Methods”chmodSync()
Section titled “chmodSync()”chmodSync(
path,mode):void
Defined in: src/backend.ts:129
Parameters
Section titled “Parameters”string
number
Returns
Section titled “Returns”void
chownSync()
Section titled “chownSync()”chownSync(
path,new_uid,new_gid):void
Defined in: src/backend.ts:137
Parameters
Section titled “Parameters”string
new_uid
Section titled “new_uid”number
new_gid
Section titled “new_gid”number
Returns
Section titled “Returns”void
createFile()
Section titled “createFile()”
abstractcreateFile(path,options):Promise<InodeLike<number>>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:186
Create the file at path with the given options.
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”Promise<InodeLike<number>>
Inherited from
Section titled “Inherited from”Sync(FileSystem).createFile
createFileSync()
Section titled “createFileSync()”createFileSync(
path,options):Inode
Defined in: src/backend.ts:76
Create the file at path with the given options.
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”Inode
Overrides
Section titled “Overrides”Sync(FileSystem).createFileSync
exists()
Section titled “exists()”exists(
path):Promise<boolean>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:202
Test whether or not path exists.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<boolean>
Inherited from
Section titled “Inherited from”Sync(FileSystem).exists
existsSync()
Section titled “existsSync()”existsSync(
path):boolean
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:206
Test whether or not path exists.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”Sync(FileSystem).existsSync
link()
Section titled “link()”
abstractlink(target,link):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:207
Parameters
Section titled “Parameters”target
Section titled “target”string
string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Sync(FileSystem).link
linkSync()
Section titled “linkSync()”linkSync(
srcpath,dstpath):void
Defined in: src/backend.ts:157
Right now this method is just a mask for symlinks
Parameters
Section titled “Parameters”srcpath
Section titled “srcpath”string
dstpath
Section titled “dstpath”string
Returns
Section titled “Returns”void
track hard links
Overrides
Section titled “Overrides”Sync(FileSystem).linkSync
mkdir()
Section titled “mkdir()”
abstractmkdir(path,options):Promise<InodeLike<number>>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:195
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”Promise<InodeLike<number>>
Inherited from
Section titled “Inherited from”Sync(FileSystem).mkdir
mkdirSync()
Section titled “mkdirSync()”mkdirSync(
path,options):Inode
Defined in: src/backend.ts:103
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”Inode
Overrides
Section titled “Overrides”Sync(FileSystem).mkdirSync
read()
Section titled “read()”
abstractread(path,buffer,start,end):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:217
Reads into a buffer
Parameters
Section titled “Parameters”string
buffer
Section titled “buffer”Uint8Array
The buffer to read into. You must set the byteOffset and byteLength appropriately!
number
The offset into the file to start reading from
number
The position in the file to stop reading
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Sync(FileSystem).read
readdir()
Section titled “readdir()”
abstractreaddir(path):Promise<string[]>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:197
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<string[]>
Inherited from
Section titled “Inherited from”Sync(FileSystem).readdir
readdirSync()
Section titled “readdirSync()”readdirSync(
path):string[]
Defined in: src/backend.ts:112
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string[]
Overrides
Section titled “Overrides”Sync(FileSystem).readdirSync
readlinkSync()
Section titled “readlinkSync()”readlinkSync(
path):string
Defined in: src/backend.ts:165
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
readSync()
Section titled “readSync()”readSync(
path,buffer,offset,end):void
Defined in: src/backend.ts:181
Reads into a buffer
Parameters
Section titled “Parameters”string
buffer
Section titled “buffer”Uint8Array
The buffer to read into. You must set the byteOffset and byteLength appropriately!
offset
Section titled “offset”number
number
The position in the file to stop reading
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”Sync(FileSystem).readSync
ready()
Section titled “ready()”ready():
Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:173
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Sync(FileSystem).ready
readySync()
Section titled “readySync()”readySync():
void
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:174
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Sync(FileSystem).readySync
rename()
Section titled “rename()”
abstractrename(oldPath,newPath):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:175
Parameters
Section titled “Parameters”oldPath
Section titled “oldPath”string
newPath
Section titled “newPath”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Sync(FileSystem).rename
renameSync()
Section titled “renameSync()”renameSync(
oldPath,newPath):void
Defined in: src/backend.ts:53
Parameters
Section titled “Parameters”oldPath
Section titled “oldPath”string
newPath
Section titled “newPath”string
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”Sync(FileSystem).renameSync
rmdir()
Section titled “rmdir()”
abstractrmdir(path):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:193
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Sync(FileSystem).rmdir
rmdirSync()
Section titled “rmdirSync()”rmdirSync(
path):void
Defined in: src/backend.ts:95
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”Sync(FileSystem).rmdirSync
stat()
Section titled “stat()”
abstractstat(path):Promise<InodeLike<number>>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:177
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<InodeLike<number>>
Inherited from
Section titled “Inherited from”Sync(FileSystem).stat
statSync()
Section titled “statSync()”statSync(
path):Inode
Defined in: src/backend.ts:61
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Inode
Overrides
Section titled “Overrides”Sync(FileSystem).statSync
streamRead()
Section titled “streamRead()”streamRead(
path,options):ReadableStream
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:241
Read a file using a stream.
Parameters
Section titled “Parameters”string
options
Section titled “options”StreamOptions
Returns
Section titled “Returns”ReadableStream
Inherited from
Section titled “Inherited from”Sync(FileSystem).streamRead
streamWrite()
Section titled “streamWrite()”streamWrite(
path,options):WritableStream
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:246
Write a file using stream.
Parameters
Section titled “Parameters”string
options
Section titled “options”StreamOptions
Returns
Section titled “Returns”WritableStream
Inherited from
Section titled “Inherited from”Sync(FileSystem).streamWrite
symlinkSync()
Section titled “symlinkSync()”symlinkSync(
srcpath,dstpath):void
Defined in: src/backend.ts:145
Parameters
Section titled “Parameters”srcpath
Section titled “srcpath”string
dstpath
Section titled “dstpath”string
Returns
Section titled “Returns”void
sync()
Section titled “sync()”
abstractsync():Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:209
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Sync(FileSystem).sync
syncSync()
Section titled “syncSync()”syncSync():
void
Defined in: src/backend.ts:51
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”Sync(FileSystem).syncSync
toString()
Section titled “toString()”toString():
string
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:166
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”Sync(FileSystem).toString
touch()
Section titled “touch()”
abstracttouch(path,metadata):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:180
Modify metadata.
Parameters
Section titled “Parameters”string
metadata
Section titled “metadata”Partial<InodeLike>
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Sync(FileSystem).touch
touchSync()
Section titled “touchSync()”touchSync(
path,inode):void
Defined in: src/backend.ts:40
Modify metadata.
Parameters
Section titled “Parameters”string
Partial<InodeLike>
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”Sync(FileSystem).touchSync
truncateSync()
Section titled “truncateSync()”truncateSync(
path,len):void
Defined in: src/backend.ts:121
Parameters
Section titled “Parameters”string
number
Returns
Section titled “Returns”void
unlink()
Section titled “unlink()”
abstractunlink(path):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:191
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Sync(FileSystem).unlink
unlinkSync()
Section titled “unlinkSync()”unlinkSync(
path):void
Defined in: src/backend.ts:87
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”Sync(FileSystem).unlinkSync
usage()
Section titled “usage()”usage():
UsageInfo
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:172
Default implementation.
Returns
Section titled “Returns”UsageInfo
Implement
Inherited from
Section titled “Inherited from”Sync(FileSystem).usage
utimesSync()
Section titled “utimesSync()”utimesSync(
path,atime,mtime):void
Defined in: src/backend.ts:173
Parameters
Section titled “Parameters”string
number
number
Returns
Section titled “Returns”void
write()
Section titled “write()”
abstractwrite(path,buffer,offset):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:230
Writes a buffer to a file
Parameters
Section titled “Parameters”string
buffer
Section titled “buffer”Uint8Array
The buffer to write. You must set the byteOffset and byteLength appropriately!
offset
Section titled “offset”number
The offset in the file to start writing
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Sync(FileSystem).write
writeSync()
Section titled “writeSync()”writeSync(
path,buffer,offset):void
Defined in: src/backend.ts:190
Writes a buffer to a file
Parameters
Section titled “Parameters”string
buffer
Section titled “buffer”Uint8Array
The buffer to write. You must set the byteOffset and byteLength appropriately!
offset
Section titled “offset”number
The offset in the file to start writing
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”Sync(FileSystem).writeSync