Skip to content

Class: NodeShapedDirectoryHandle

Documentation / @wtf/platform-fs-adapter / handles / NodeShapedDirectoryHandle

Defined in: packages/platform-fs-adapter/src/handles.ts:543

A folder’s handle, of a file system shaped as Node’s: each entry of it found, made, listed and removed, each handle of one made by handleOf; and the path of an entry in it. NodeShapedDirectoryHandle.root makes the root of a file system, of the class it is called of.

Extends

Constructors

Constructor

new NodeShapedDirectoryHandle(context, path): NodeShapedDirectoryHandle;

Defined in: packages/platform-fs-adapter/src/handles.ts:194

The handle of the entry of path, of the file system and the writables of context.

Parameters

ParameterType
contextNodeShapedContext
pathstring

Returns

NodeShapedDirectoryHandle

Inherited from

NodeShapedHandle.constructor

Properties

PropertyModifierTypeOverridesDefined in
kindreadonly"directory"NodeShapedHandle.kindpackages/platform-fs-adapter/src/handles.ts:544

Accessors

name

Get Signature

get name(): string;

Defined in: packages/platform-fs-adapter/src/handles.ts:215

Returns

string

Inherited from

NodeShapedHandle.name

Methods

[asyncIterator]()

asyncIterator: AsyncGenerator<[string,
| NodeShapedDirectoryHandle
| NodeShapedFileHandle]>;

Defined in: packages/platform-fs-adapter/src/handles.ts:662

Returns

AsyncGenerator<[string, | NodeShapedDirectoryHandle | NodeShapedFileHandle]>


entries()

entries(): AsyncGenerator<[string,
| NodeShapedDirectoryHandle
| NodeShapedFileHandle]>;

Defined in: packages/platform-fs-adapter/src/handles.ts:637

Each entry, by its name: a link as what it leads to, and none of a link that leads to nothing, nor of a file a writable writes beside the file it writes.

Returns

AsyncGenerator<[string, | NodeShapedDirectoryHandle | NodeShapedFileHandle]>


getDirectoryHandle()

getDirectoryHandle(name, __namedParameters?): Promise<NodeShapedDirectoryHandle>;

Defined in: packages/platform-fs-adapter/src/handles.ts:591

Parameters

ParameterType
namestring
__namedParametersFileSystemGetOptions

Returns

Promise<NodeShapedDirectoryHandle>


getFileHandle()

getFileHandle(name, __namedParameters?): Promise<NodeShapedFileHandle>;

Defined in: packages/platform-fs-adapter/src/handles.ts:572

Parameters

ParameterType
namestring
__namedParametersFileSystemGetOptions

Returns

Promise<NodeShapedFileHandle>


isSameEntry()

isSameEntry(other): Promise<boolean>;

Defined in: packages/platform-fs-adapter/src/handles.ts:253

Parameters

ParameterType
otherFileSystemHandle

Returns

Promise<boolean>

Inherited from

NodeShapedHandle.isSameEntry


keys()

keys(): AsyncGenerator<string>;

Defined in: packages/platform-fs-adapter/src/handles.ts:654

Returns

AsyncGenerator<string>


move()

move(destination, newName?): Promise<void>;

Defined in: packages/platform-fs-adapter/src/handles.ts:270

Parameters

ParameterType
destination| string | FileSystemDirectoryHandle
newName?string

Returns

Promise<void>

Inherited from

NodeShapedHandle.move


removeEntry()

removeEntry(name, __namedParameters?): Promise<void>;

Defined in: packages/platform-fs-adapter/src/handles.ts:611

Parameters

ParameterType
namestring
__namedParametersFileSystemRemoveOptions

Returns

Promise<void>


resolve()

resolve(possibleDescendant): Promise<string[] | null>;

Defined in: packages/platform-fs-adapter/src/handles.ts:624

Parameters

ParameterType
possibleDescendantFileSystemHandle

Returns

Promise<string[] | null>


values()

values(): AsyncGenerator<
| NodeShapedDirectoryHandle
| NodeShapedFileHandle>;

Defined in: packages/platform-fs-adapter/src/handles.ts:658

Returns

AsyncGenerator< | NodeShapedDirectoryHandle | NodeShapedFileHandle>


root()

static root<D>(
this,
fs,
path,
__namedParameters?
): Promise<D>;

Defined in: packages/platform-fs-adapter/src/handles.ts:553

The handle of the folder of path of fs, an instance of the class this is called of, whose entries are made by its handleOf: a path not there fails a NotFoundError, or, with create, is made, with each folder on the way; a file there fails a TypeMismatchError. path is as fs reads it: a relative one is of the folder its process is in. Every handle of one file system, of every folder given of it, shares the writables open of it.

Type Parameters

Type Parameter
D extends NodeShapedDirectoryHandle

Parameters

ParameterType
this(context, path) => D
fsNodeShapedFileSystem
pathstring
__namedParametersFromNodeShapedOptions

Returns

Promise<D>