Skip to content

DevTmpFS

Defined in: src/fs/devtmpfs.ts:57

A temporary file system that manages and interfaces with devices

  • StoreFS<InMemoryStore>

new DevTmpFS(): DevTmpFS

Defined in: src/fs/devtmpfs.ts:58

DevTmpFS

StoreFS<InMemoryStore>.constructor

protected _initialized: boolean

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:41

StoreFS._initialized


protected optional _mountPoint?: string

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:144

Internal

The last place this file system was mounted

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.

StoreFS._uuid


readonly attributes: ConstMap<FileSystemAttributes, keyof FileSystemAttributes, void | CaseFold | undefined> & Map<string, any>

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:155

FileSystemAttributes

StoreFS.attributes


optional label?: string

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:139

StoreFS.label


readonly name: 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

StoreFS.name


protected readonly store: InMemoryStore

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:14

StoreFS.store


readonly type: 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

StoreFS.type

get uuid(): `${string}-${string}-${string}-${string}-${string}`

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:151

`${string}-${string}-${string}-${string}-${string}`

StoreFS.uuid

_add(ino, path): void

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:32

Add a inode/path pair

number

string

void

StoreFS._add


protected _create_path(path): void

Defined in: src/fs/devtmpfs.ts:93

mkdir -p for the parents of a node in a subdirectory

string

void


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

string

void


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.

string

InodeLike = ...

The node’s inode, for callers that already have an authoritative one

DeviceFile & object | undefined

ENXIO when nothing has claimed the node’s device number


protected _mount(): void

Defined in: src/fs/devtmpfs.ts:77

Take over as the devtmpfs and create nodes for devices registered before we existed

void


_move(from, to): void

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:40

Move paths in the tables

string

string

void

StoreFS._move


_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

number

string | undefined

StoreFS._path


_remove(ino): void

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:36

Remove a inode/path pair

number

void

StoreFS._remove


protected allocNew(path): number

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:135

Allocates a new ID and adds the ID/path

string

number

StoreFS.allocNew


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.

Promise<void>

StoreFS.checkRoot


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.

void

StoreFS.checkRootSync


protected commitNew(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.

string

The path to the new file.

CreationOptions

The options to create the new file with.

Uint8Array

The data to store at the file’s data node.

Promise<Inode>

StoreFS.commitNew


protected commitNewSync(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.

string

The path to the new file.

CreationOptions

The options to create the new file with.

Uint8Array

The data to store at the file’s data node.

Inode

The Inode for the new file.

StoreFS.commitNewSync


create_node(device): void

Defined in: src/fs/devtmpfs.ts:113

Internal

Device

void


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.

string

CreationOptions

Promise<Inode>

StoreFS.createFile


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.

string

CreationOptions

Inode

StoreFS.createFileSync


createIndex(): Promise<Index>

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:59

Promise<Index>

StoreFS.createIndex


createIndexSync(): Index

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:60

Index

StoreFS.createIndexSync


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.

Device

void


exists(path): Promise<boolean>

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:203

Test whether or not path exists.

string

Promise<boolean>

StoreFS.exists


existsSync(path): boolean

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:207

Test whether or not path exists.

string

boolean

StoreFS.existsSync


protected findInode(tx, path): Promise<Inode>

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:125

Finds the Inode of path.

WrappedTransaction

string

The path to look up.

Promise<Inode>

memoize/cache

StoreFS.findInode


protected findInodeSync(tx, path): Inode

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:132

Finds the Inode of path.

WrappedTransaction

string

The path to look up.

Inode

The Inode of the path p.

memoize/cache

StoreFS.findInodeSync


ioctl(context, command, …args): Promise<unknown>

Defined in: src/fs/devtmpfs.ts:202

Internal

IoctlContext

number

unknown[]

Promise<unknown>

StoreFS.ioctl


ioctlSync(context, command, …args): unknown

Defined in: src/fs/devtmpfs.ts:196

Internal

IoctlContext

number

unknown[]

unknown

StoreFS.ioctlSync


link(target, link): Promise<void>

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:88

string

string

Promise<void>

StoreFS.link


linkSync(target, link): void

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:89

string

string

void

StoreFS.linkSync


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

Index

Promise<void>

StoreFS.loadIndex


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

Index

void

StoreFS.loadIndexSync


mkdir(path, options): Promise<Inode>

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:76

string

CreationOptions

Promise<Inode>

StoreFS.mkdir


mkdirSync(path, options): Inode

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:77

string

CreationOptions

Inode

StoreFS.mkdirSync


mknodSync(path, mode, rdev): InodeLike

Defined in: src/fs/devtmpfs.ts:87

Create a device node, like mknod.

string

number

number

The device number

InodeLike


read(path, buffer, start, end): Promise<void>

Defined in: src/fs/devtmpfs.ts:172

string

Uint8Array

number

number

Promise<void>

StoreFS.read


readdir(path): Promise<string[]>

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:78

string

Promise<string[]>

StoreFS.readdir


readdirSync(path): string[]

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:79

string

string[]

StoreFS.readdirSync


readSync(path, buffer, start, end): void

Defined in: src/fs/devtmpfs.ts:164

string

Uint8Array

number

number

void

StoreFS.readSync


ready(): Promise<void>

Defined in: src/fs/devtmpfs.ts:66

Promise<void>

StoreFS.ready


readySync(): void

Defined in: src/fs/devtmpfs.ts:71

void

StoreFS.readySync


protected remove(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.

string

The path to remove from the file system.

boolean

Does the path belong to a directory, or a file?

Promise<void>

StoreFS.remove


protected removeSync(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.

string

The path to remove from the file system.

boolean

Does the path belong to a directory, or a file?

void

StoreFS.removeSync


rename(oldPath, newPath): Promise<void>

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:64

string

string

Promise<void>

Make rename compatible with the cache.

StoreFS.rename


renameSync(oldPath, newPath): void

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:65

string

string

void

StoreFS.renameSync


rmdir(path): Promise<void>

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:74

string

Promise<void>

StoreFS.rmdir


rmdirSync(path): void

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:75

string

void

StoreFS.rmdirSync


stat(path): Promise<Inode>

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:66

string

Promise<Inode>

StoreFS.stat


statSync(path): Inode

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:67

string

Inode

StoreFS.statSync


streamRead(path, options): ReadableStream

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:242

Read a file using a stream.

string

StreamOptions

ReadableStream

StoreFS.streamRead


streamWrite(path, options): WritableStream

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:247

Write a file using stream.

string

StreamOptions

WritableStream

StoreFS.streamWrite


sync(): Promise<void>

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:83

Updated the inode and data node at path

Promise<void>

StoreFS.sync


syncSync(): void

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:87

Updated the inode and data node at path

void

StoreFS.syncSync


toString(): string

Defined in: node_modules/@zenfs/core/dist/internal/filesystem.d.ts:167

string

StoreFS.toString


touch(path, metadata): Promise<void>

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:68

Modify metadata.

string

Partial<InodeLike>

Promise<void>

StoreFS.touch


touchSync(path, metadata): void

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:69

Modify metadata.

string

Partial<InodeLike>

void

StoreFS.touchSync


unlink(path): Promise<void>

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:72

string

Promise<void>

StoreFS.unlink


unlinkSync(path): void

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:73

string

void

StoreFS.unlinkSync


usage(): UsageInfo

Defined in: node_modules/@zenfs/core/dist/backends/store/fs.d.ts:48

UsageInfo

StoreFS.usage


write(path, buffer, offset): Promise<void>

Defined in: src/fs/devtmpfs.ts:188

string

Uint8Array

number

Promise<void>

StoreFS.write


writeSync(path, buffer, offset): void

Defined in: src/fs/devtmpfs.ts:180

string

Uint8Array

number

void

StoreFS.writeSync