Skip to content

DevTmpFS

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

A temporary file system that manages and interfaces with devices

  • StoreFS<InMemoryStore>

new DevTmpFS(): DevTmpFS

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

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:145

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:151

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:156

FileSystemAttributes

StoreFS.attributes


optional label?: string

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

StoreFS.label


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

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:134

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:152

`${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:112

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

string

void


protected _delete_path(path): void

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

Remove the directories a node was in, as long as they are empty

string

void


_device(path, inode?): DeviceFileWithOps | undefined

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

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

DeviceFileWithOps | undefined

ENXIO when nothing has claimed the node’s device number


protected _mount(): void

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

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:126

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:93

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:97

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:134

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: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.

Inode

The Inode for the new file.

StoreFS.commitNewSync


create_node(device): void

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

Internal

Device

void


createFile(path, options): Promise<Inode>

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

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:68

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:56

Promise<Index>

StoreFS.createIndex


createIndexSync(): Index

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

Index

StoreFS.createIndexSync


delete_node(device): void

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

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:204

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:208

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:116

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:123

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:238

Internal

IoctlContext

number

…unknown[]

Promise<unknown>

StoreFS.ioctl


ioctlSync(context, command, …args): unknown

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

Internal

IoctlContext

number

…unknown[]

unknown

StoreFS.ioctlSync


link(target, link): Promise<void>

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

string

string

Promise<void>

StoreFS.link


linkSync(target, link): void

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

string

string

void

StoreFS.linkSync


loadIndex(index): Promise<void>

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

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:55

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:73

string

CreationOptions

Promise<Inode>

StoreFS.mkdir


mkdirSync(path, options): Inode

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

string

CreationOptions

Inode

StoreFS.mkdirSync


mknodSync(path, mode, rdev): InodeLike

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

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:208

string

Uint8Array

number

number

Promise<void>

StoreFS.read


read_device(file, buffer, start, end): number

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

Read from a device node and say how much came back.

This is the same call readSync makes; it exists because a terminal handing over one line is a short read, and going through the VFS loses the count.

DeviceFileWithOps

Uint8Array

number

number

number


readdir(path): Promise<string[]>

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

string

Promise<string[]>

StoreFS.readdir


readdirSync(path): string[]

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

string

string[]

StoreFS.readdirSync


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

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

string

Uint8Array

number

number

void

StoreFS.readSync


ready(): Promise<void>

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

Promise<void>

StoreFS.ready


readySync(): void

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

void

StoreFS.readySync


protected remove(path, isDir): Promise<void>

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

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:155

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:61

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:62

string

string

void

StoreFS.renameSync


rmdir(path): Promise<void>

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

string

Promise<void>

StoreFS.rmdir


rmdirSync(path): void

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

string

void

StoreFS.rmdirSync


stat(path): Promise<Inode>

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

string

Promise<Inode>

StoreFS.stat


statSync(path): Inode

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

string

Inode

StoreFS.statSync


streamRead(path, options): ReadableStream

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

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:248

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:77

Promise<void>

StoreFS.sync


syncSync(): void

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

void

StoreFS.syncSync


toString(): string

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

string

StoreFS.toString


touch(path, metadata): Promise<void>

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

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:66

Modify metadata.

string

Partial<InodeLike>

void

StoreFS.touchSync


unlink(path): Promise<void>

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

string

Promise<void>

StoreFS.unlink


unlinkSync(path): void

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

string

void

StoreFS.unlinkSync


usage(): UsageInfo

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

Default implementation.

UsageInfo

Implement

StoreFS.usage


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

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

string

Uint8Array

number

Promise<void>

StoreFS.write


write_device(file, buffer, offset): number

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

The write half of read_device, for a device that can take less than it was offered

DeviceFileWithOps

Uint8Array

number

number


writeSync(path, buffer, offset): void

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

string

Uint8Array

number

void

StoreFS.writeSync