VDL Plugin SDK

dirname

Import from @varavel/vdl-plugin-sdk/utils/paths.

function dirname(path): string;

Returns the parent directory portion of a path.

Parameters

ParameterTypeDescription
pathstringPath to inspect.

Returns

string

The directory name portion of path.

Example

dirname("generated/models/user.ts");
// returns "generated/models"

See

Powered by pathe (MIT License): https://github.com/unjs/pathe