MCPcopy Create free account
hub / github.com/chhoumann/quickadd / parentFolderPath

Function parentFolderPath

src/utils/pathUtils.ts:13–17  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

11 * path (no trailing slash). A file at the vault root yields an empty string.
12 */
13export function parentFolderPath(path: string): string {
14 const normalized = normalizePath(path);
15 const slashIndex = normalized.lastIndexOf('/');
16 return slashIndex === -1 ? '' : normalized.slice(0, slashIndex);
17}

Callers 9

setDestinationFileMethod · 0.90
formatContentWithFileMethod · 0.90
createFileWithTemplateFunction · 0.90
appendToFileWithTemplateFunction · 0.90
runMethod · 0.90

Calls 1

normalizePathFunction · 0.90

Tested by

no test coverage detected