SysFS
Defined in: src/fs/sysfs.ts:6
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SysFS():
SysFS
Defined in: src/fs/sysfs.ts:7
Returns
Section titled “Returns”SysFS
Overrides
Section titled “Overrides”KernelFS<KObject, Attribute, KLink>.constructor
Properties
Section titled “Properties”_inodes
Section titled “_inodes”
protected_inodes:Map<string,Inode>
Defined in: src/fs/kernfs.ts:33
Inherited from
Section titled “Inherited from”KernelFS._inodes
_mountPoint?
Section titled “_mountPoint?”
protectedoptional_mountPoint?:string
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:145
Internal
The last place this file system was mounted
Inherited from
Section titled “Inherited from”KernelFS._mountPoint
_nextIno
Section titled “_nextIno”
protected_nextIno:number=1
Defined in: src/fs/kernfs.ts:31
Inherited from
Section titled “Inherited from”KernelFS._nextIno
protected_uuid:`${string}-${string}-${string}-${string}-${string}`
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:151
Internal
The UUID of the file system.
Inherited from
Section titled “Inherited from”KernelFS._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:156
FileSystemAttributes
Inherited from
Section titled “Inherited from”KernelFS.attributes
enableFileSize
Section titled “enableFileSize”
protectedreadonlyenableFileSize:boolean=false
Defined in: src/fs/kernfs.ts:39
If set, statSync will get the actual file size
Inherited from
Section titled “Inherited from”KernelFS.enableFileSize
initTime
Section titled “initTime”
protectedreadonlyinitTime:number
Defined in: src/fs/kernfs.ts:29
Inherited from
Section titled “Inherited from”KernelFS.initTime
label?
Section titled “label?”
optionallabel?:string
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:140
Inherited from
Section titled “Inherited from”KernelFS.label
lookup
Section titled “lookup”
protectedlookup: (path) =>KEntry|null=sysfs_lookup
Defined in: src/fs/sysfs.ts:11
Resolve a path to a node.
Resolve a sysfs path.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”KEntry | null
null if nothing exists at path
Throws
Section titled “Throws”ENOTDIR when part of path is used as a directory but isn’t a kobject
Returns
Section titled “Returns”null or undefined when nothing is there
Throws
Section titled “Throws”ENOTDIR when part of path is used as a directory but isn’t one
Overrides
Section titled “Overrides”KernelFS.lookup
readonlyname:string
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:139
The name for this file system. For example, tmpfs for an in memory one
Inherited from
Section titled “Inherited from”KernelFS.name
readonlytype:number
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:134
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”KernelFS.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:152
Returns
Section titled “Returns”`${string}-${string}-${string}-${string}-${string}`
Inherited from
Section titled “Inherited from”KernelFS.uuid
Methods
Section titled “Methods”_forget()
Section titled “_forget()”
protected_forget(path):void
Defined in: src/fs/kernfs.ts:101
Forget the inode for path, and for everything that was under it
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”KernelFS._forget
_getInode()
Section titled “_getInode()”
protected_getInode(path,node):Inode
Defined in: src/fs/kernfs.ts:80
The inode for a path, made the first time it is asked for and kept so that the times and the inode number stay put across calls.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Inode
Inherited from
Section titled “Inherited from”KernelFS._getInode
_lookup()
Section titled “_lookup()”Defined in: src/fs/kernfs.ts:58
Resolve a path to a node.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Throws
Section titled “Throws”ENOENT when nothing is there, ENOTDIR when part of the path isn’t a directory
Inherited from
Section titled “Inherited from”KernelFS._lookup
createFile()
Section titled “createFile()”
abstractcreateFile(path,options):Promise<InodeLike<number>>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:188
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”KernelFS.createFile
createFileSync()
Section titled “createFileSync()”createFileSync(
_path,_options):InodeLike
Defined in: src/fs/kernfs.ts:151
Create the file at path with the given options.
Parameters
Section titled “Parameters”string
_options
Section titled “_options”CreationOptions
Returns
Section titled “Returns”InodeLike
Inherited from
Section titled “Inherited from”KernelFS.createFileSync
exists()
Section titled “exists()”exists(
path):Promise<boolean>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:204
Test whether or not path exists.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<boolean>
Inherited from
Section titled “Inherited from”existsSync()
Section titled “existsSync()”existsSync(
path):boolean
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:208
Test whether or not path exists.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”KernelFS.existsSync
ioctl()
Section titled “ioctl()”ioctl(
context,command, …args):Promise<any>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:250
Internal
Parameters
Section titled “Parameters”context
Section titled “context”IoctlContext
command
Section titled “command”number
…any[]
Returns
Section titled “Returns”Promise<any>
Inherited from
Section titled “Inherited from”KernelFS.ioctl
ioctlSync()
Section titled “ioctlSync()”ioctlSync(
context,command, …args):any
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:252
Internal
Parameters
Section titled “Parameters”context
Section titled “context”IoctlContext
command
Section titled “command”number
…any[]
Returns
Section titled “Returns”any
Inherited from
Section titled “Inherited from”KernelFS.ioctlSync
is_dir()
Section titled “is_dir()”
protectedis_dir(entry):entry is KObject
Defined in: src/fs/sysfs.ts:13
Parameters
Section titled “Parameters”Returns
Section titled “Returns”entry is KObject
Overrides
Section titled “Overrides”KernelFS.is_dir
is_link()
Section titled “is_link()”
protectedis_link(entry):entry is KLink
Defined in: src/fs/sysfs.ts:17
Parameters
Section titled “Parameters”Returns
Section titled “Returns”entry is KLink
Overrides
Section titled “Overrides”KernelFS.is_link
link()
Section titled “link()”
abstractlink(target,link):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:209
Parameters
Section titled “Parameters”target
Section titled “target”string
string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”KernelFS.link
linkSync()
Section titled “linkSync()”linkSync():
void
Defined in: src/fs/kernfs.ts:147
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”KernelFS.linkSync
mkdir()
Section titled “mkdir()”
abstractmkdir(path,options):Promise<InodeLike<number>>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:197
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”Promise<InodeLike<number>>
Inherited from
Section titled “Inherited from”KernelFS.mkdir
mkdirSync()
Section titled “mkdirSync()”mkdirSync(
_path,_options):InodeLike
Defined in: src/fs/kernfs.ts:159
Parameters
Section titled “Parameters”string
_options
Section titled “_options”CreationOptions
Returns
Section titled “Returns”InodeLike
Inherited from
Section titled “Inherited from”KernelFS.mkdirSync
read()
Section titled “read()”
abstractread(path,buffer,start,end):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:219
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”KernelFS.read
readdir()
Section titled “readdir()”
abstractreaddir(path):Promise<string[]>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:199
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<string[]>
Inherited from
Section titled “Inherited from”KernelFS.readdir
readdirSync()
Section titled “readdirSync()”readdirSync(
path):string[]
Defined in: src/fs/kernfs.ts:116
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string[]
Inherited from
Section titled “Inherited from”KernelFS.readdirSync
readSync()
Section titled “readSync()”readSync(
path,buffer,start,end):void
Defined in: src/fs/kernfs.ts:122
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”void
Inherited from
Section titled “Inherited from”KernelFS.readSync
ready()
Section titled “ready()”ready():
Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:175
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”KernelFS.ready
readySync()
Section titled “readySync()”readySync():
void
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:176
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”KernelFS.readySync
rename()
Section titled “rename()”
abstractrename(oldPath,newPath):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:177
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”KernelFS.rename
renameSync()
Section titled “renameSync()”renameSync():
void
Defined in: src/fs/kernfs.ts:143
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”KernelFS.renameSync
rmdir()
Section titled “rmdir()”
abstractrmdir(path):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:195
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”KernelFS.rmdir
rmdirSync()
Section titled “rmdirSync()”rmdirSync(
_path):void
Defined in: src/fs/kernfs.ts:163
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”KernelFS.rmdirSync
stat()
Section titled “stat()”
abstractstat(path):Promise<InodeLike<number>>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:179
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<InodeLike<number>>
Inherited from
Section titled “Inherited from”KernelFS.stat
statSync()
Section titled “statSync()”statSync(
path):InodeLike
Defined in: src/fs/kernfs.ts:105
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”InodeLike
Inherited from
Section titled “Inherited from”KernelFS.statSync
store()
Section titled “store()”
protectedstore(node,value):void
Defined in: src/fs/kernfs.ts:68
Take what was written to a node.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Throws
Section titled “Throws”EIO when there is nothing behind the file to take it
Inherited from
Section titled “Inherited from”KernelFS.store
streamRead()
Section titled “streamRead()”streamRead(
path,options):ReadableStream
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:243
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”KernelFS.streamRead
streamWrite()
Section titled “streamWrite()”streamWrite(
path,options):WritableStream
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:248
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”KernelFS.streamWrite
sync()
Section titled “sync()”
abstractsync():Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:211
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”KernelFS.sync
syncSync()
Section titled “syncSync()”syncSync():
void
Defined in: src/fs/kernfs.ts:139
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”KernelFS.syncSync
toString()
Section titled “toString()”toString():
string
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:168
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”KernelFS.toString
touch()
Section titled “touch()”
abstracttouch(path,metadata):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:182
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”KernelFS.touch
touchSync()
Section titled “touchSync()”touchSync(
path,metadata):void
Defined in: src/fs/kernfs.ts:112
Modify metadata.
Parameters
Section titled “Parameters”string
metadata
Section titled “metadata”Partial<InodeLike>
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”KernelFS.touchSync
unlink()
Section titled “unlink()”
abstractunlink(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”KernelFS.unlink
unlinkSync()
Section titled “unlinkSync()”unlinkSync(
_path):void
Defined in: src/fs/kernfs.ts:155
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”KernelFS.unlinkSync
usage()
Section titled “usage()”usage():
UsageInfo
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:174
Default implementation.
Returns
Section titled “Returns”UsageInfo
Implement
Inherited from
Section titled “Inherited from”KernelFS.usage
write()
Section titled “write()”
abstractwrite(path,buffer,offset):Promise<void>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:232
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”KernelFS.write
writeSync()
Section titled “writeSync()”writeSync(
path,buffer,offset):void
Defined in: src/fs/kernfs.ts:131
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
Inherited from
Section titled “Inherited from”KernelFS.writeSync