Skip to content
1 min read · 198 words

Interface: OpfsDirectoryHandle

Defined in: batteries/storage/opfs/index.ts:79

Minimal subset of the File System AccessOpfsDirectoryHandle interface that this module touches at runtime. Structurally compatible with the DOM-lib OpfsDirectoryHandle — at call sites you pass real OPFS handles directly.

Properties

PropertyModifierTypeDefined in
kindreadonly"directory"batteries/storage/opfs/index.ts:80
namereadonlystringbatteries/storage/opfs/index.ts:81

Methods

getDirectoryHandle()

ts
getDirectoryHandle(name: string, options?: {
  create?: boolean;
}): Promise<OpfsDirectoryHandle>;

Defined in: batteries/storage/opfs/index.ts:83

Parameters

ParameterType
namestring
options?{ create?: boolean; }
options.create?boolean

Returns

Promise<OpfsDirectoryHandle>


getFileHandle()

ts
getFileHandle(name: string, options?: {
  create?: boolean;
}): Promise<OpfsFileHandle>;

Defined in: batteries/storage/opfs/index.ts:82

Parameters

ParameterType
namestring
options?{ create?: boolean; }
options.create?boolean

Returns

Promise<OpfsFileHandle>


removeEntry()

ts
removeEntry(name: string, options?: {
  recursive?: boolean;
}): Promise<void>;

Defined in: batteries/storage/opfs/index.ts:84

Parameters

ParameterType
namestring
options?{ recursive?: boolean; }
options.recursive?boolean

Returns

Promise<void>