Skip to content

Function: at()

Documentation / @wtf/platform-fs / path / at

Call Signature

function at<D>(
root,
path,
options
): Promise<Awaited<ReturnType<D["getFileHandle"]>>>;

Defined in: packages/platform-fs/src/path.ts:86

The handle of path in root: of a file, of kind: 'file', or a folder, of kind: 'directory', or either. With create, it is made where it is not there, and each folder on the way. '', . and / are root itself. What is not there raises a SystemError of NotFound, an entry of the other kind one of BadResource, and a path out of the folder a BadArgument.

Type Parameters

Type Parameter
D extends FileSystemDirectoryHandle

Parameters

ParameterType
rootD
pathstring
optionsAtOptions & object

Returns

Promise<Awaited<ReturnType<D["getFileHandle"]>>>

Call Signature

function at<D>(
root,
path,
options
): Promise<Awaited<ReturnType<D["getDirectoryHandle"]>>>;

Defined in: packages/platform-fs/src/path.ts:91

The handle of path in root: of a file, of kind: 'file', or a folder, of kind: 'directory', or either. With create, it is made where it is not there, and each folder on the way. '', . and / are root itself. What is not there raises a SystemError of NotFound, an entry of the other kind one of BadResource, and a path out of the folder a BadArgument.

Type Parameters

Type Parameter
D extends FileSystemDirectoryHandle

Parameters

ParameterType
rootD
pathstring
optionsAtOptions & object

Returns

Promise<Awaited<ReturnType<D["getDirectoryHandle"]>>>

Call Signature

function at<D>(
root,
path,
options?
): Promise<
| Awaited<ReturnType<D["getFileHandle"]>>
| Awaited<ReturnType<D["getDirectoryHandle"]>>>;

Defined in: packages/platform-fs/src/path.ts:96

The handle of path in root: of a file, of kind: 'file', or a folder, of kind: 'directory', or either. With create, it is made where it is not there, and each folder on the way. '', . and / are root itself. What is not there raises a SystemError of NotFound, an entry of the other kind one of BadResource, and a path out of the folder a BadArgument.

Type Parameters

Type Parameter
D extends FileSystemDirectoryHandle

Parameters

ParameterType
rootD
pathstring
options?AtOptions & object

Returns

Promise< | Awaited<ReturnType<D["getFileHandle"]>> | Awaited<ReturnType<D["getDirectoryHandle"]>>>