Skip to content

ProcFS

Defined in: src/fs/procfs.ts:311

A view of ZenFS’ contexts and of the kernel emulation, laid out the way Linux lays out /proc.

https://www.kernel.org/doc/html/latest/filesystems/proc.html

  • AsyncFSMethods<this> & FileSystem<this>

new ProcFS(): ProcFS

Defined in: src/fs/procfs.ts:318

ProcFS

Sync(FileSystem).constructor

protected _inodes: Map<string, Inode>

Defined in: src/fs/procfs.ts:316


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

Sync(FileSystem)._mountPoint


protected _nextIno: number = 1

Defined in: src/fs/procfs.ts:314


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.

Sync(FileSystem)._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

Sync(FileSystem).attributes


protected readonly initTime: number

Defined in: src/fs/procfs.ts:312


optional label?: string

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

Sync(FileSystem).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

Sync(FileSystem).name


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

Sync(FileSystem).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}`

Sync(FileSystem).uuid

protected _lookup(path): ProcEntry

Defined in: src/fs/procfs.ts:322

string

ProcEntry


abstract createFile(path, options): Promise<InodeLike<number>>

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

Create the file at path with the given options.

string

CreationOptions

Promise<InodeLike<number>>

Sync(FileSystem).createFile


createFileSync(): InodeLike

Defined in: src/fs/procfs.ts:366

Create the file at path with the given options.

InodeLike

Sync(FileSystem).createFileSync


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>

DevTmpFS.exists


existsSync(path): boolean

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

Test whether or not path exists.

string

boolean

Sync(FileSystem).existsSync


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

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

Internal

IoctlContext

number

any[]

Promise<any>

Sync(FileSystem).ioctl


ioctlSync(context, command, …args): any

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

Internal

IoctlContext

number

any[]

any

Sync(FileSystem).ioctlSync


abstract link(target, link): Promise<void>

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

string

string

Promise<void>

Sync(FileSystem).link


linkSync(): void

Defined in: src/fs/procfs.ts:388

void

Sync(FileSystem).linkSync


abstract mkdir(path, options): Promise<InodeLike<number>>

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

string

CreationOptions

Promise<InodeLike<number>>

Sync(FileSystem).mkdir


mkdirSync(): InodeLike

Defined in: src/fs/procfs.ts:378

InodeLike

Sync(FileSystem).mkdirSync


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

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

Reads into a buffer

string

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

Promise<void>

Sync(FileSystem).read


abstract readdir(path): Promise<string[]>

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

string

Promise<string[]>

Sync(FileSystem).readdir


readdirSync(path): string[]

Defined in: src/fs/procfs.ts:382

string

string[]

Sync(FileSystem).readdirSync


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

Defined in: src/fs/procfs.ts:396

Reads into a buffer

string

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

void

Sync(FileSystem).readSync


ready(): Promise<void>

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

Promise<void>

Sync(FileSystem).ready


readySync(): void

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

void

Sync(FileSystem).readySync


abstract rename(oldPath, newPath): Promise<void>

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

string

string

Promise<void>

Sync(FileSystem).rename


renameSync(): void

Defined in: src/fs/procfs.ts:348

void

Sync(FileSystem).renameSync


abstract rmdir(path): Promise<void>

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

string

Promise<void>

Sync(FileSystem).rmdir


rmdirSync(): void

Defined in: src/fs/procfs.ts:374

void

Sync(FileSystem).rmdirSync


abstract stat(path): Promise<InodeLike<number>>

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

string

Promise<InodeLike<number>>

Sync(FileSystem).stat


statSync(path): InodeLike

Defined in: src/fs/procfs.ts:352

string

InodeLike

Sync(FileSystem).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

Sync(FileSystem).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

Sync(FileSystem).streamWrite


abstract sync(): Promise<void>

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

Promise<void>

Sync(FileSystem).sync


syncSync(): void

Defined in: src/fs/procfs.ts:392

void

Sync(FileSystem).syncSync


toString(): string

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

string

Sync(FileSystem).toString


abstract touch(path, metadata): Promise<void>

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

Modify metadata.

string

Partial<InodeLike>

Promise<void>

Sync(FileSystem).touch


touchSync(path, metadata): void

Defined in: src/fs/procfs.ts:362

Modify metadata.

string

Partial<InodeLike>

void

Sync(FileSystem).touchSync


abstract unlink(path): Promise<void>

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

string

Promise<void>

Sync(FileSystem).unlink


unlinkSync(): void

Defined in: src/fs/procfs.ts:370

void

Sync(FileSystem).unlinkSync


usage(): UsageInfo

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

Default implementation.

UsageInfo

Implement

Sync(FileSystem).usage


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

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

Writes a buffer to a file

string

Uint8Array

The buffer to write. You must set the byteOffset and byteLength appropriately!

number

The offset in the file to start writing

Promise<void>

Sync(FileSystem).write


writeSync(path, buffer, offset): void

Defined in: src/fs/procfs.ts:406

Writes a buffer to a file

string

Uint8Array

The buffer to write. You must set the byteOffset and byteLength appropriately!

number

The offset in the file to start writing

void

Sync(FileSystem).writeSync