Skip to main content
default.PlatformPath.dirname - path - Node documentation
method default.PlatformPath.dirname

Usage in Deno

import type mod from "node:path";
PlatformPath.dirname(path: string): string

Return the directory name of a path. Similar to the Unix dirname command.

Parameters

path: string

the path to evaluate.

Return Type

string

Throws

TypeError

if path is not a string.