Skip to content

XMLFS

Defined in: src/xml.ts:41

  • AsyncFSMethods<this> & FileSystem<this>

new XMLFS(root?): XMLFS

Defined in: src/xml.ts:42

Element = ...

The root fs element

XMLFS

Sync(FileSystem).constructor

protected optional _mountPoint?: string

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

Internal

The last place this file system was mounted

Sync(FileSystem)._mountPoint


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

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

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

FileSystemAttributes

Sync(FileSystem).attributes


optional label?: string

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

Sync(FileSystem).label


readonly name: string

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

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

Sync(FileSystem).name


readonly root: Element

Defined in: src/xml.ts:46

The root fs element


readonly type: number

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

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

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

Sync(FileSystem).uuid

protected add(syscall, node, path, contents?): void

Defined in: src/xml.ts:166

string

Element

string

boolean = false

void


protected create(syscall, path, stats): Element

Defined in: src/xml.ts:151

string

string

Partial<InodeLike<number>> & Pick<StatsLike<number | bigint>, "mode">

Element


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

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

Create the file at path with the given options.

string

CreationOptions

Promise<InodeLike<number>>

Sync(FileSystem).createFile


createFileSync(path, options): Inode

Defined in: src/xml.ts:68

Create the file at path with the given options.

string

CreationOptions

Inode

Sync(FileSystem).createFileSync


exists(path): Promise<boolean>

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

Test whether or not path exists.

string

Promise<boolean>

WebAccessFS.exists


existsSync(path): boolean

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

Test whether or not path exists.

string

boolean

Sync(FileSystem).existsSync


protected get(syscall, path): Element

Defined in: src/xml.ts:142

string

string

Element


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

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

string

string

Promise<void>

Sync(FileSystem).link


linkSync(target, link): void

Defined in: src/xml.ts:113

string

string

void

Sync(FileSystem).linkSync


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

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

string

CreationOptions

Promise<InodeLike<number>>

Sync(FileSystem).mkdir


mkdirSync(path, options): InodeLike

Defined in: src/xml.ts:92

string

CreationOptions

InodeLike

Sync(FileSystem).mkdirSync


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

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

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

string

Promise<string[]>

Sync(FileSystem).readdir


readdirSync(path): string[]

Defined in: src/xml.ts:103

string

string[]

Sync(FileSystem).readdirSync


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

Defined in: src/xml.ts:125

Reads into a buffer

string

Uint8Array

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

number

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

Promise<void>

Sync(FileSystem).ready


readySync(): void

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

void

Sync(FileSystem).readySync


protected remove(syscall, node, path, contents?): void

Defined in: src/xml.ts:181

string

Element

string

boolean = false

void


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

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

string

string

Promise<void>

Sync(FileSystem).rename


renameSync(oldPath, newPath): void

Defined in: src/xml.ts:58

string

string

void

Sync(FileSystem).renameSync


abstract rmdir(path): Promise<void>

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

string

Promise<void>

Sync(FileSystem).rmdir


rmdirSync(path): void

Defined in: src/xml.ts:85

string

void

Sync(FileSystem).rmdirSync


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

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

string

Promise<InodeLike<number>>

Sync(FileSystem).stat


statSync(path): Inode

Defined in: src/xml.ts:64

string

Inode

Sync(FileSystem).statSync


streamRead(path, options): ReadableStream

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

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

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

Promise<void>

Sync(FileSystem).sync


syncSync(): void

Defined in: src/xml.ts:123

void

Sync(FileSystem).syncSync


toString(): string

Defined in: src/xml.ts:138

string

Sync(FileSystem).toString


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

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

Modify metadata.

string

Partial<InodeLike>

Promise<void>

Sync(FileSystem).touch


touchSync(path, metadata): void

Defined in: src/xml.ts:118

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

string

Promise<void>

Sync(FileSystem).unlink


unlinkSync(path): void

Defined in: src/xml.ts:79

string

void

Sync(FileSystem).unlinkSync


usage(): UsageInfo

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

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

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/xml.ts:131

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