Skip to content

Function: parent()

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

function parent<D>(
root,
path,
__namedParameters?
): Promise<{
directory: Awaited<ReturnType<D["getDirectoryHandle"]>>;
name: string;
}>;

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

The folder path is in, found from root, or made, with each on the way, with create; and the name of path there. The folder itself, of no name, is a BadArgument.

Type Parameters

Type Parameter
D extends FileSystemDirectoryHandle

Parameters

ParameterType
rootD
pathstring
__namedParameters{ create?: boolean; }
__namedParameters.create?boolean

Returns

Promise<{ directory: Awaited<ReturnType<D["getDirectoryHandle"]>>; name: string; }>