DevTmpFS
Defined in: src/fs/devtmpfs.ts:57
A temporary file system that manages and interfaces with devices
Extends
Section titled “Extends”StoreFS<InMemoryStore>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DevTmpFS():
DevTmpFS
Defined in: src/fs/devtmpfs.ts:58
Returns
Section titled “Returns”DevTmpFS
Overrides
Section titled “Overrides”StoreFS<InMemoryStore>.constructor
Properties
Section titled “Properties”_initialized
Section titled “_initialized”
protected_initialized:boolean
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:41
Inherited from
Section titled “Inherited from”StoreFS._initialized
_mountPoint?
Section titled “_mountPoint?”
protectedoptional_mountPoint?:string
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:144
Internal
The last place this file system was mounted
Inherited from
Section titled “Inherited from”StoreFS._mountPoint
protected_uuid:`${string}-${string}-${string}-${string}-${string}`
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:150
Internal
The UUID of the file system.
Inherited from
Section titled “Inherited from”StoreFS._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:155
FileSystemAttributes
Inherited from
Section titled “Inherited from”StoreFS.attributes
label?
Section titled “label?”
optionallabel?:string
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:139
Inherited from
Section titled “Inherited from”StoreFS.label
readonlyname:string
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:138
The name for this file system. For example, tmpfs for an in memory one
Inherited from
Section titled “Inherited from”StoreFS.name
protectedreadonlystore:InMemoryStore
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:14
Inherited from
Section titled “Inherited from”StoreFS.store
readonlytype:number
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:133
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”StoreFS.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:151
Returns
Section titled “Returns”`${string}-${string}-${string}-${string}-${string}`
Inherited from
Section titled “Inherited from”StoreFS.uuid
Methods
Section titled “Methods”_add()
Section titled “_add()”_add(
ino,path):void
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:32
Add a inode/path pair
Parameters
Section titled “Parameters”number
string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”StoreFS._add
_create_path()
Section titled “_create_path()”
protected_create_path(path):void
Defined in: src/fs/devtmpfs.ts:93
mkdir -p for the parents of a node in a subdirectory
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
_delete_path()
Section titled “_delete_path()”
protected_delete_path(path):void
Defined in: src/fs/devtmpfs.ts:103
Remove the directories a node was in, as long as they are empty
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
_device()
Section titled “_device()”
protected_device(path,inode?):DeviceFile&object|undefined
Defined in: src/fs/devtmpfs.ts:153
The driver handling the node at path, if it is a device node.
Parameters
Section titled “Parameters”string
inode?
Section titled “inode?”InodeLike = ...
The node’s inode, for callers that already have an authoritative one
Returns
Section titled “Returns”DeviceFile & object | undefined
Throws
Section titled “Throws”ENXIO when nothing has claimed the node’s device number
_mount()
Section titled “_mount()”
protected_mount():void
Defined in: src/fs/devtmpfs.ts:77
Take over as the devtmpfs and create nodes for devices registered before we existed
Returns
Section titled “Returns”void
_move()
Section titled “_move()”_move(
from,to):void
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:40
Move paths in the tables
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”StoreFS._move
_path()
Section titled “_path()”_path(
id):string|undefined
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:28
Gets the first path associated with an inode
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”string | undefined
Inherited from
Section titled “Inherited from”StoreFS._path
_remove()
Section titled “_remove()”_remove(
ino):void
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:36
Remove a inode/path pair
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”StoreFS._remove
allocNew()
Section titled “allocNew()”
protectedallocNew(path):number
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:135
Allocates a new ID and adds the ID/path
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”StoreFS.allocNew
checkRoot()
Section titled “checkRoot()”checkRoot():
Promise<void>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:102
Checks if the root directory exists. Creates it if it doesn’t.
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”StoreFS.checkRoot
checkRootSync()
Section titled “checkRootSync()”checkRootSync():
void
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:106
Checks if the root directory exists. Creates it if it doesn’t.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”StoreFS.checkRootSync
commitNew()
Section titled “commitNew()”
protectedcommitNew(path,options,data):Promise<Inode>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:143
Commits a new file (well, a FILE or a DIRECTORY) to the file system with mode.
Note: This will commit the transaction.
Parameters
Section titled “Parameters”string
The path to the new file.
options
Section titled “options”CreationOptions
The options to create the new file with.
Uint8Array
The data to store at the file’s data node.
Returns
Section titled “Returns”Promise<Inode>
Inherited from
Section titled “Inherited from”StoreFS.commitNew
commitNewSync()
Section titled “commitNewSync()”
protectedcommitNewSync(path,options,data):Inode
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:152
Commits a new file (well, a FILE or a DIRECTORY) to the file system with mode.
Note: This will commit the transaction.
Parameters
Section titled “Parameters”string
The path to the new file.
options
Section titled “options”CreationOptions
The options to create the new file with.
Uint8Array
The data to store at the file’s data node.
Returns
Section titled “Returns”Inode
The Inode for the new file.
Inherited from
Section titled “Inherited from”StoreFS.commitNewSync
create_node()
Section titled “create_node()”create_node(
device):void
Defined in: src/fs/devtmpfs.ts:113
Internal
Parameters
Section titled “Parameters”device
Section titled “device”Returns
Section titled “Returns”void
createFile()
Section titled “createFile()”createFile(
path,options):Promise<Inode>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:70
Create the file at path with the given options.
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”Promise<Inode>
Inherited from
Section titled “Inherited from”StoreFS.createFile
createFileSync()
Section titled “createFileSync()”createFileSync(
path,options):Inode
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:71
Create the file at path with the given options.
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”Inode
Inherited from
Section titled “Inherited from”StoreFS.createFileSync
createIndex()
Section titled “createIndex()”createIndex():
Promise<Index>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:59
Returns
Section titled “Returns”Promise<Index>
Inherited from
Section titled “Inherited from”StoreFS.createIndex
createIndexSync()
Section titled “createIndexSync()”createIndexSync():
Index
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:60
Returns
Section titled “Returns”Index
Inherited from
Section titled “Inherited from”StoreFS.createIndexSync
delete_node()
Section titled “delete_node()”delete_node(
device):void
Defined in: src/fs/devtmpfs.ts:128
Internal
Only remove a node if it is one we created and it still refers to this device,
so a node someone replaced is left alone. This is Linux’s dev_mynode.
Parameters
Section titled “Parameters”device
Section titled “device”Returns
Section titled “Returns”void
exists()
Section titled “exists()”exists(
path):Promise<boolean>
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:203
Test whether or not path exists.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<boolean>
Inherited from
Section titled “Inherited from”StoreFS.exists
existsSync()
Section titled “existsSync()”existsSync(
path):boolean
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:207
Test whether or not path exists.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”StoreFS.existsSync
findInode()
Section titled “findInode()”
protectedfindInode(tx,path):Promise<Inode>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:125
Finds the Inode of path.
Parameters
Section titled “Parameters”WrappedTransaction
string
The path to look up.
Returns
Section titled “Returns”Promise<Inode>
memoize/cache
Inherited from
Section titled “Inherited from”StoreFS.findInode
findInodeSync()
Section titled “findInodeSync()”
protectedfindInodeSync(tx,path):Inode
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:132
Finds the Inode of path.
Parameters
Section titled “Parameters”WrappedTransaction
string
The path to look up.
Returns
Section titled “Returns”Inode
The Inode of the path p.
memoize/cache
Inherited from
Section titled “Inherited from”StoreFS.findInodeSync
ioctl()
Section titled “ioctl()”ioctl(
context,command, …args):Promise<unknown>
Defined in: src/fs/devtmpfs.ts:202
Internal
Parameters
Section titled “Parameters”context
Section titled “context”IoctlContext
command
Section titled “command”number
…unknown[]
Returns
Section titled “Returns”Promise<unknown>
Overrides
Section titled “Overrides”StoreFS.ioctl
ioctlSync()
Section titled “ioctlSync()”ioctlSync(
context,command, …args):unknown
Defined in: src/fs/devtmpfs.ts:196
Internal
Parameters
Section titled “Parameters”context
Section titled “context”IoctlContext
command
Section titled “command”number
…unknown[]
Returns
Section titled “Returns”unknown
Overrides
Section titled “Overrides”StoreFS.ioctlSync
link()
Section titled “link()”link(
target,link):Promise<void>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:88
Parameters
Section titled “Parameters”target
Section titled “target”string
string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”StoreFS.link
linkSync()
Section titled “linkSync()”linkSync(
target,link):void
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:89
Parameters
Section titled “Parameters”target
Section titled “target”string
string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”StoreFS.linkSync
loadIndex()
Section titled “loadIndex()”loadIndex(
index):Promise<void>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:53
Load an index into the StoreFS. You must manually add non-directory files
Parameters
Section titled “Parameters”Index
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”StoreFS.loadIndex
loadIndexSync()
Section titled “loadIndexSync()”loadIndexSync(
index):void
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:58
Load an index into the StoreFS. You must manually add non-directory files
Parameters
Section titled “Parameters”Index
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”StoreFS.loadIndexSync
mkdir()
Section titled “mkdir()”mkdir(
path,options):Promise<Inode>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:76
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”Promise<Inode>
Inherited from
Section titled “Inherited from”StoreFS.mkdir
mkdirSync()
Section titled “mkdirSync()”mkdirSync(
path,options):Inode
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:77
Parameters
Section titled “Parameters”string
options
Section titled “options”CreationOptions
Returns
Section titled “Returns”Inode
Inherited from
Section titled “Inherited from”StoreFS.mkdirSync
mknodSync()
Section titled “mknodSync()”mknodSync(
path,mode,rdev):InodeLike
Defined in: src/fs/devtmpfs.ts:87
Create a device node, like mknod.
Parameters
Section titled “Parameters”string
number
number
The device number
Returns
Section titled “Returns”InodeLike
read()
Section titled “read()”read(
path,buffer,start,end):Promise<void>
Defined in: src/fs/devtmpfs.ts:172
Parameters
Section titled “Parameters”string
buffer
Section titled “buffer”Uint8Array
number
number
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”StoreFS.read
readdir()
Section titled “readdir()”readdir(
path):Promise<string[]>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:78
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<string[]>
Inherited from
Section titled “Inherited from”StoreFS.readdir
readdirSync()
Section titled “readdirSync()”readdirSync(
path):string[]
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:79
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string[]
Inherited from
Section titled “Inherited from”StoreFS.readdirSync
readSync()
Section titled “readSync()”readSync(
path,buffer,start,end):void
Defined in: src/fs/devtmpfs.ts:164
Parameters
Section titled “Parameters”string
buffer
Section titled “buffer”Uint8Array
number
number
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”StoreFS.readSync
ready()
Section titled “ready()”ready():
Promise<void>
Defined in: src/fs/devtmpfs.ts:66
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”StoreFS.ready
readySync()
Section titled “readySync()”readySync():
void
Defined in: src/fs/devtmpfs.ts:71
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”StoreFS.readySync
remove()
Section titled “remove()”
protectedremove(path,isDir):Promise<void>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:158
Remove all traces of path from the file system.
Parameters
Section titled “Parameters”string
The path to remove from the file system.
boolean
Does the path belong to a directory, or a file?
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”StoreFS.remove
removeSync()
Section titled “removeSync()”
protectedremoveSync(path,isDir):void
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:164
Remove all traces of path from the file system.
Parameters
Section titled “Parameters”string
The path to remove from the file system.
boolean
Does the path belong to a directory, or a file?
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”StoreFS.removeSync
rename()
Section titled “rename()”rename(
oldPath,newPath):Promise<void>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:64
Parameters
Section titled “Parameters”oldPath
Section titled “oldPath”string
newPath
Section titled “newPath”string
Returns
Section titled “Returns”Promise<void>
Make rename compatible with the cache.
Inherited from
Section titled “Inherited from”StoreFS.rename
renameSync()
Section titled “renameSync()”renameSync(
oldPath,newPath):void
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:65
Parameters
Section titled “Parameters”oldPath
Section titled “oldPath”string
newPath
Section titled “newPath”string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”StoreFS.renameSync
rmdir()
Section titled “rmdir()”rmdir(
path):Promise<void>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:74
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”StoreFS.rmdir
rmdirSync()
Section titled “rmdirSync()”rmdirSync(
path):void
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:75
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”StoreFS.rmdirSync
stat()
Section titled “stat()”stat(
path):Promise<Inode>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:66
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<Inode>
Inherited from
Section titled “Inherited from”StoreFS.stat
statSync()
Section titled “statSync()”statSync(
path):Inode
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:67
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Inode
Inherited from
Section titled “Inherited from”StoreFS.statSync
streamRead()
Section titled “streamRead()”streamRead(
path,options):ReadableStream
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:242
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”StoreFS.streamRead
streamWrite()
Section titled “streamWrite()”streamWrite(
path,options):WritableStream
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:247
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”StoreFS.streamWrite
sync()
Section titled “sync()”sync():
Promise<void>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:83
Updated the inode and data node at path
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”StoreFS.sync
syncSync()
Section titled “syncSync()”syncSync():
void
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:87
Updated the inode and data node at path
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”StoreFS.syncSync
toString()
Section titled “toString()”toString():
string
Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:167
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”StoreFS.toString
touch()
Section titled “touch()”touch(
path,metadata):Promise<void>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:68
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”StoreFS.touch
touchSync()
Section titled “touchSync()”touchSync(
path,metadata):void
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:69
Modify metadata.
Parameters
Section titled “Parameters”string
metadata
Section titled “metadata”Partial<InodeLike>
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”StoreFS.touchSync
unlink()
Section titled “unlink()”unlink(
path):Promise<void>
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:72
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”StoreFS.unlink
unlinkSync()
Section titled “unlinkSync()”unlinkSync(
path):void
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:73
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”StoreFS.unlinkSync
usage()
Section titled “usage()”usage():
UsageInfo
Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:48
Returns
Section titled “Returns”UsageInfo
Inherited from
Section titled “Inherited from”StoreFS.usage
write()
Section titled “write()”write(
path,buffer,offset):Promise<void>
Defined in: src/fs/devtmpfs.ts:188
Parameters
Section titled “Parameters”string
buffer
Section titled “buffer”Uint8Array
offset
Section titled “offset”number
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”StoreFS.write
writeSync()
Section titled “writeSync()”writeSync(
path,buffer,offset):void
Defined in: src/fs/devtmpfs.ts:180
Parameters
Section titled “Parameters”string
buffer
Section titled “buffer”Uint8Array
offset
Section titled “offset”number
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”StoreFS.writeSync