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

Function parentLabel

src/utils/fileSyntax.ts:278–283  ·  view source on GitHub ↗
(file: TFile)

Source from the content-addressed store, hash-verified

276}
277
278function parentLabel(file: TFile): string {
279 const parent = file.parent?.path;
280 if (parent && parent !== "/") return parent;
281 if (file.path.includes("/")) return file.path.slice(0, file.path.lastIndexOf("/"));
282 return "vault root";
283}
284
285function basenameFor(file: TFile): string {
286 if (file.basename) return file.basename;

Callers 1

buildFileDisplayInfosFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected