Skip to content

Function: fromNodeShaped()

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

function fromNodeShaped(
fs,
path,
options?
): Promise<NodeShapedDirectoryHandle>;

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

The handle of the folder of path of fs, a file system shaped as Node’s fs/promises: Node’s, Bun’s or Deno’s, or memfs’. 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. Of a file system given its synchronous calls, sync, each file’s handle has createSyncAccessHandle().

Parameters

ParameterType
fsNodeShapedFileSystem
pathstring
options?FromNodeShapedOptions

Returns

Promise<NodeShapedDirectoryHandle>