Skip to content
1 min read · 177 words

Interface: OpfsDirectoryHandle

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

PropertyModifierType
kindreadonly"directory"
namereadonlystring

Methods

getDirectoryHandle()

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

Parameters

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

Returns

Promise<OpfsDirectoryHandle>


getFileHandle()

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

Parameters

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

Returns

Promise<OpfsFileHandle>


removeEntry()

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

Parameters

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

Returns

Promise<void>