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
| Parameter | Type |
|---|---|
context | NodeShapedContext |
path | string |
Returns
NodeShapedDirectoryHandle
Inherited from
Properties
| Property | Modifier | Type | Overrides | Defined in |
|---|---|---|---|---|
kind | readonly | "directory" | NodeShapedHandle.kind | packages/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
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
| Parameter | Type |
|---|---|
name | string |
__namedParameters | FileSystemGetOptions |
Returns
Promise<NodeShapedDirectoryHandle>
getFileHandle()
getFileHandle(name, __namedParameters?): Promise<NodeShapedFileHandle>;Defined in: packages/platform-fs-adapter/src/handles.ts:572
Parameters
| Parameter | Type |
|---|---|
name | string |
__namedParameters | FileSystemGetOptions |
Returns
Promise<NodeShapedFileHandle>
isSameEntry()
isSameEntry(other): Promise<boolean>;Defined in: packages/platform-fs-adapter/src/handles.ts:253
Parameters
| Parameter | Type |
|---|---|
other | FileSystemHandle |
Returns
Promise<boolean>
Inherited from
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
| Parameter | Type |
|---|---|
destination | | string | FileSystemDirectoryHandle |
newName? | string |
Returns
Promise<void>
Inherited from
removeEntry()
removeEntry(name, __namedParameters?): Promise<void>;Defined in: packages/platform-fs-adapter/src/handles.ts:611
Parameters
| Parameter | Type |
|---|---|
name | string |
__namedParameters | FileSystemRemoveOptions |
Returns
Promise<void>
resolve()
resolve(possibleDescendant): Promise<string[] | null>;Defined in: packages/platform-fs-adapter/src/handles.ts:624
Parameters
| Parameter | Type |
|---|---|
possibleDescendant | FileSystemHandle |
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
| Parameter | Type |
|---|---|
this | (context, path) => D |
fs | NodeShapedFileSystem |
path | string |
__namedParameters | FromNodeShapedOptions |
Returns
Promise<D>
