Skip to content

PurePath.fromURI() method

pathlib-ts > PurePath > fromURI

Creates a path from a file:// URI string.

Signature:

static fromURI(uri: string): PurePath;

Parameter

Type

Description

uri

string

URI starting with file:.

Returns:

PurePath

A new PurePath matching the URI.

The TypeError If uri cannot be converted into a file path.

Returns a pure path instance with no filesystem checks occurring. Delegates to fileURLToPath and thus throws on invalid inputs.