Skip to content

WebAccessFS

Defined in: src/access.ts:50

Internal

Consider supporting synchronous stuff with FileSystemFileHandle.createSyncAccessHandle()\

  • AsyncMixin<this> & IndexFS<this>

new WebAccessFS(root, disableHandleCache?): WebAccessFS

Defined in: src/access.ts:110

FileSystemDirectoryHandle

boolean = false

WebAccessFS

Async(IndexFS).constructor

protected _handles: Map<string, FileSystemHandle>

Defined in: src/access.ts:56

Used to speed up handle lookups. Without this, every lookup would be O(n) on the path length. With the cache, these become O(1) operations.


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

Async(IndexFS)._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.

Async(IndexFS)._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

Async(IndexFS).attributes


protected readonly disableHandleCache: boolean = false

Defined in: src/access.ts:112


readonly index: Index

Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:10

Async(IndexFS).index


optional label?: string

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

Async(IndexFS).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

Async(IndexFS).name


protected readonly root: FileSystemDirectoryHandle

Defined in: src/access.ts:111


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

Async(IndexFS).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}`

Async(IndexFS).uuid

_mkdir(path): Promise<void>

Defined in: src/access.ts:272

string

Promise<void>

Async(IndexFS)._mkdir


protected optional _mkdirSync(path, options): void

Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:34

string

CreationOptions

void

Async(IndexFS)._mkdirSync


protected _remove(path, isUnlink): void

Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:23

string

boolean

void

Async(IndexFS)._remove


protected create(path, options): Inode

Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:30

string

CreationOptions

Inode

Async(IndexFS).create


createFile(path, options): Promise<Inode>

Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:31

Create the file at path with the given options.

string

CreationOptions

Promise<Inode>

Async(IndexFS).createFile


abstract createFileSync(path, options): InodeLike

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

Create the file at path with the given options.

string

CreationOptions

InodeLike

Async(IndexFS).createFileSync

abstract createFileSync(path, options): Inode

Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:32

Create the file at path with the given options.

string

CreationOptions

Inode

Async(IndexFS).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>

Async(IndexFS).exists


existsSync(path): boolean

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

Test whether or not path exists.

string

boolean

Async(IndexFS).existsSync


protected get<T>(kind?, path): Promise<HKindToType<T>>

Defined in: src/access.ts:278

T extends FileSystemHandleKind | null

T = ...

string

Promise<HKindToType<T>>


link(target, link): Promise<void>

Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:37

string

string

Promise<void>

Async(IndexFS).link


abstract linkSync(target, link): void

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

string

string

void

Async(IndexFS).linkSync


mkdir(path, options): Promise<Inode>

Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:35

string

CreationOptions

Promise<Inode>

Async(IndexFS).mkdir


abstract mkdirSync(path, options): InodeLike

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

string

CreationOptions

InodeLike

Async(IndexFS).mkdirSync

abstract mkdirSync(path, options): Inode

Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:36

string

CreationOptions

Inode

Async(IndexFS).mkdirSync


queueDone(): Promise<void>

Defined in: node_modules/@zenfs/core/dist/mixins/async.d.ts:22

Promise<void>

Async(IndexFS).queueDone


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

Defined in: src/access.ts:195

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

Promise<void>

Async(IndexFS).read


readdir(path): Promise<string[]>

Defined in: src/access.ts:179

string

Promise<string[]>

Async(IndexFS).readdir


abstract readdirSync(path): string[]

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

string

string[]

Async(IndexFS).readdirSync


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

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

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

Async(IndexFS).readSync


ready(): Promise<void>

Defined in: node_modules/@zenfs/core/dist/mixins/async.d.ts:23

Promise<void>

Async(IndexFS).ready


readySync(): void

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

void

XMLFS.readySync


protected remove(path): Promise<void>

Defined in: src/access.ts:184

string

Promise<void>

Async(IndexFS).remove


protected removeSync(): void

Defined in: src/access.ts:191

void

Async(IndexFS).removeSync


rename(oldPath, newPath): Promise<void>

Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:17

string

string

Promise<void>

Async(IndexFS).rename


abstract renameSync(oldPath, newPath): void

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

string

string

void

Async(IndexFS).renameSync


rmdir(path): Promise<void>

Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:28

string

Promise<void>

Async(IndexFS).rmdir


abstract rmdirSync(path): void

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

string

void

Async(IndexFS).rmdirSync


stat(path): Promise<Inode>

Defined in: src/access.ts:119

string

Promise<Inode>

Async(IndexFS).stat


abstract statSync(path): InodeLike

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

string

InodeLike

Async(IndexFS).statSync

abstract statSync(path): Inode

Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:20

string

Inode

Async(IndexFS).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

Async(IndexFS).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

Async(IndexFS).streamWrite


sync(): Promise<void>

Defined in: node_modules/@zenfs/core/dist/mixins/async.d.ts:24

Promise<void>

Async(IndexFS).sync


abstract syncSync(): void

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

void

Async(IndexFS).syncSync


toString(): string

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

string

Async(IndexFS).toString


touch(path, metadata): Promise<void>

Defined in: src/access.ts:152

string

InodeLike

Promise<void>

Async(IndexFS).touch


abstract touchSync(path, metadata): void

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

Modify metadata.

string

Partial<InodeLike>

void

Async(IndexFS).touchSync

abstract touchSync(path, metadata): void

Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:22

Modify metadata.

string

InodeLike

void

Async(IndexFS).touchSync


unlink(path): Promise<void>

Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:26

string

Promise<void>

Async(IndexFS).unlink


abstract unlinkSync(path): void

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

string

void

Async(IndexFS).unlinkSync


usage(): UsageInfo

Defined in: node_modules/@zenfs/core/dist/internal/index_fs.d.ts:12

Default implementation.

UsageInfo

Implement

Async(IndexFS).usage


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

Defined in: src/access.ts:217

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>

Async(IndexFS).write


abstract writeSync(path, buffer, offset): void

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

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

Async(IndexFS).writeSync