Skip to content

resolvePathFromRootSafe

Resolves a path relative to the root folder, returning the resolved path or the original path if it does not exist.

Import:

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

Signature:

function resolvePathFromRootSafe(params: ResolvePathFromRootSafeParams): string

Parameters:

ParameterTypeDescription
paramsResolvePathFromRootSafeParamsThe parameters for the function.

Returns: string — The resolved path or the original path if it does not exist.


Links to this page: