Skip to content

WebAccessFS

Defined in: src/access.ts:56

Internal

Consider supporting synchronous stuff with FileSystemFileHandle.createSyncAccessHandle()\

  • AsyncMixin<this> & IndexFS<this>

new WebAccessFS(root, disableHandleCache?): WebAccessFS

Defined in: src/access.ts:114

FileSystemDirectoryHandle

boolean = false

WebAccessFS

Async(IndexFS).constructor

protected optional _crossCopySemaphore?: Semaphore

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

Internal

Restrict how many files can be copied across at once

Async(IndexFS)._crossCopySemaphore


protected _handles: Map<string, FileSystemHandle>

Defined in: src/access.ts:62

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

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

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

FileSystemAttributes

Async(IndexFS).attributes


protected readonly disableHandleCache: boolean = false

Defined in: src/access.ts:116


readonly index: Index

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

Async(IndexFS).index


optional label?: string

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

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

Async(IndexFS).name


protected readonly root: FileSystemDirectoryHandle

Defined in: src/access.ts:115


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

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

Async(IndexFS).uuid

protected _create(path, inode): Promise<void>

Defined in: src/access.ts:277

Create a new file in the underlying backend

string

Inode

Promise<void>

Async(IndexFS)._create


protected optional _createSync(path, inode): void

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

Create a new file in the underlying backend

string

Inode

void

Async(IndexFS)._createSync


_mkdir(path): Promise<void>

Defined in: src/access.ts:283

string

Promise<void>

Async(IndexFS)._mkdir


protected optional _mkdirSync(path, options): void

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

string

CreationOptions

void

Async(IndexFS)._mkdirSync


protected _remove(path, isUnlink): void

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

string

boolean

void

Async(IndexFS)._remove


protected create(path, options): Inode

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

string

CreationOptions

Inode

Async(IndexFS).create


createFile(path, options): Promise<Inode>

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

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

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

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

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

Test whether or not path exists.

string

boolean

Async(IndexFS).existsSync


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

Defined in: src/access.ts:289

T extends FileSystemHandleKind | null

T = ...

string

Promise<HKindToType<T>>


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

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

Internal

IoctlContext

number

…any[]

Promise<any>

Async(IndexFS).ioctl


ioctlSync(context, command, …args): any

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

Internal

IoctlContext

number

…any[]

any

XMLFS.ioctlSync


link(target, link): Promise<void>

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

string

string

Promise<void>

Async(IndexFS).link


abstract linkSync(target, link): void

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

string

string

void

Async(IndexFS).linkSync


mkdir(path, options): Promise<Inode>

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

string

CreationOptions

Promise<Inode>

Async(IndexFS).mkdir


abstract mkdirSync(path, options): InodeLike

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

string

CreationOptions

InodeLike

Async(IndexFS).mkdirSync

abstract mkdirSync(path, options): Inode

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

string

CreationOptions

Inode

Async(IndexFS).mkdirSync


queueDone(): Promise<void>

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

Promise<void>

Async(IndexFS).queueDone


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

Defined in: src/access.ts:199

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

string

Promise<string[]>

Async(IndexFS).readdir


abstract readdirSync(path): string[]

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

string

string[]

Async(IndexFS).readdirSync


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

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

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

Promise<void>

Async(IndexFS).ready


readySync(): void

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

void

XMLFS.readySync


protected remove(path): Promise<void>

Defined in: src/access.ts:188

string

Promise<void>

Async(IndexFS).remove


protected removeSync(): void

Defined in: src/access.ts:195

void

Async(IndexFS).removeSync


rename(oldPath, newPath): Promise<void>

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

string

string

Promise<void>

Async(IndexFS).rename


abstract renameSync(oldPath, newPath): void

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

string

string

void

Async(IndexFS).renameSync


rmdir(path): Promise<void>

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

string

Promise<void>

Async(IndexFS).rmdir


abstract rmdirSync(path): void

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

string

void

Async(IndexFS).rmdirSync


stat(path): Promise<Inode>

Defined in: src/access.ts:123

string

Promise<Inode>

Async(IndexFS).stat


abstract statSync(path): InodeLike

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

string

InodeLike

Async(IndexFS).statSync

abstract statSync(path): Inode

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

string

Inode

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

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

Async(IndexFS).streamWrite


sync(): Promise<void>

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

Promise<void>

Async(IndexFS).sync


abstract syncSync(): void

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

void

Async(IndexFS).syncSync


toString(): string

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

string

Async(IndexFS).toString


touch(path, metadata): Promise<void>

Defined in: src/access.ts:156

string

InodeLike

Promise<void>

Async(IndexFS).touch


abstract touchSync(path, metadata): void

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

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

Modify metadata.

string

InodeLike

void

Async(IndexFS).touchSync


unlink(path): Promise<void>

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

string

Promise<void>

Async(IndexFS).unlink


abstract unlinkSync(path): void

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

string

void

Async(IndexFS).unlinkSync


usage(): UsageInfo

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

Default implementation.

UsageInfo

Implement

Async(IndexFS).usage


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

Defined in: src/access.ts:221

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

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