Skip to content

getRootFolder

Retrieves the root folder of the project.

Import:

import { getRootFolder } from 'obsidian-dev-utils/script-utils/root';

Signature:

function getRootFolder(cwd: string | undefined): string | null

Parameters:

ParameterTypeDescription
cwdstring | undefinedThe current working folder to resolve from.

Returns: string | null — The path to the root folder.