Skip to content

IndexFS

Defined in: src/internal/index_fs.ts:22

Internal

A file system that uses an Index for metadata.

new IndexFS(id, name, index?): IndexFS

Defined in: src/internal/index_fs.ts:23

number

string

Index = ...

IndexFS

FileSystem.constructor

protected optional _mountPoint?: string

Defined in: src/internal/filesystem.ts:162

Internal

The last place this file system was mounted

FileSystem._mountPoint


protected _uuid: `${string}-${string}-${string}-${string}-${string}`

Defined in: src/internal/filesystem.ts:169

Internal

The UUID of the file system.

FileSystem._uuid


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

Defined in: src/internal/filesystem.ts:178

FileSystemAttributes

FileSystem.attributes


readonly index: Index

Defined in: src/internal/index_fs.ts:26


optional label?: string

Defined in: src/internal/filesystem.ts:156

FileSystem.label


readonly name: string

Defined in: src/internal/filesystem.ts:191

The name for this file system. For example, tmpfs for an in memory one

FileSystem.name


readonly type: number

Defined in: src/internal/filesystem.ts:185

A unique ID for this kind of file system. Currently unused internally, but could be used for partition tables or something

FileSystem.type

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

Defined in: src/internal/filesystem.ts:171

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

FileSystem.uuid

protected optional _mkdir(path, options): Promise<void>

Defined in: src/internal/index_fs.ts:184

string

CreationOptions

Promise<void>


protected optional _mkdirSync(path, options): void

Defined in: src/internal/index_fs.ts:185

string

CreationOptions

void


protected _remove(path, isUnlink): void

Defined in: src/internal/index_fs.ts:117

string

boolean

void


protected create(path, options): Inode

Defined in: src/internal/index_fs.ts:154

string

CreationOptions

Inode


createFile(path, options): Promise<Inode>

Defined in: src/internal/index_fs.ts:176

Create the file at path with the given options.

string

CreationOptions

Promise<Inode>

FileSystem.createFile


createFileSync(path, options): Inode

Defined in: src/internal/index_fs.ts:180

Create the file at path with the given options.

string

CreationOptions

Inode

FileSystem.createFileSync


exists(path): Promise<boolean>

Defined in: src/internal/filesystem.ts:257

Test whether or not path exists.

string

Promise<boolean>

FileSystem.exists


existsSync(path): boolean

Defined in: src/internal/filesystem.ts:269

Test whether or not path exists.

string

boolean

FileSystem.existsSync


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

Defined in: src/internal/filesystem.ts:359

Internal

IoctlContext

number

any[]

Promise<any>

FileSystem.ioctl


ioctlSync(context, command, …args): any

Defined in: src/internal/filesystem.ts:367

Internal

IoctlContext

number

any[]

any

FileSystem.ioctlSync


link(target, link): Promise<void>

Defined in: src/internal/index_fs.ts:201

string

string

Promise<void>

FileSystem.link


linkSync(target, link): void

Defined in: src/internal/index_fs.ts:205

string

string

void

FileSystem.linkSync


mkdir(path, options): Promise<Inode>

Defined in: src/internal/index_fs.ts:187

string

CreationOptions

Promise<Inode>

FileSystem.mkdir


mkdirSync(path, options): Inode

Defined in: src/internal/index_fs.ts:194

string

CreationOptions

Inode

FileSystem.mkdirSync


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

Defined in: src/internal/filesystem.ts:290

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>

FileSystem.read


readdir(path): Promise<string[]>

Defined in: src/internal/index_fs.ts:209

string

Promise<string[]>

FileSystem.readdir


readdirSync(path): string[]

Defined in: src/internal/index_fs.ts:213

string

string[]

FileSystem.readdirSync


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

Defined in: src/internal/filesystem.ts:297

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

FileSystem.readSync


ready(): Promise<void>

Defined in: src/internal/filesystem.ts:213

Promise<void>

FileSystem.ready


readySync(): void

Defined in: src/internal/filesystem.ts:214

void

FileSystem.readySync


abstract protected remove(path): Promise<void>

Defined in: src/internal/index_fs.ts:126

string

Promise<void>


abstract protected removeSync(path): void

Defined in: src/internal/index_fs.ts:127

string

void


rename(oldPath, newPath): Promise<void>

Defined in: src/internal/index_fs.ts:53

string

string

Promise<void>

FileSystem.rename


renameSync(oldPath, newPath): void

Defined in: src/internal/index_fs.ts:74

string

string

void

FileSystem.renameSync


rmdir(path): Promise<void>

Defined in: src/internal/index_fs.ts:139

string

Promise<void>

FileSystem.rmdir


rmdirSync(path): void

Defined in: src/internal/index_fs.ts:147

string

void

FileSystem.rmdirSync


stat(path): Promise<Inode>

Defined in: src/internal/index_fs.ts:95

string

Promise<Inode>

FileSystem.stat


statSync(path): Inode

Defined in: src/internal/index_fs.ts:101

string

Inode

FileSystem.statSync


streamRead(path, options): ReadableStream

Defined in: src/internal/filesystem.ts:317

Read a file using a stream.

string

StreamOptions

ReadableStream

FileSystem.streamRead


streamWrite(path, options): WritableStream

Defined in: src/internal/filesystem.ts:340

Write a file using stream.

string

StreamOptions

WritableStream

FileSystem.streamWrite


sync(): Promise<void>

Defined in: src/internal/index_fs.ts:217

Promise<void>

FileSystem.sync


syncSync(): void

Defined in: src/internal/index_fs.ts:219

void

FileSystem.syncSync


toString(): string

Defined in: src/internal/filesystem.ts:197

string

FileSystem.toString


touch(path, metadata): Promise<void>

Defined in: src/internal/index_fs.ts:107

Modify metadata.

string

InodeLike

Promise<void>

FileSystem.touch


touchSync(path, metadata): void

Defined in: src/internal/index_fs.ts:112

Modify metadata.

string

InodeLike

void

FileSystem.touchSync


unlink(path): Promise<void>

Defined in: src/internal/index_fs.ts:129

string

Promise<void>

FileSystem.unlink


unlinkSync(path): void

Defined in: src/internal/index_fs.ts:134

string

void

FileSystem.unlinkSync


usage(): UsageInfo

Defined in: src/internal/index_fs.ts:31

Default implementation.

UsageInfo

Implement

FileSystem.usage


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

Defined in: src/internal/filesystem.ts:304

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>

FileSystem.write


abstract writeSync(path, buffer, offset): void

Defined in: src/internal/filesystem.ts:311

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

FileSystem.writeSync