Skip to content

dirname

Returns the directory name of a path.

directory is used instead of folder to preserve compatibility with node:path module.

Import:

import { dirname } from 'obsidian-dev-utils/path';

Signature:

const dirname: (this: void, path: string) => string

Type: (this: void, path: string) => string