MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / absoluteNotePath

Function absoluteNotePath

integrations/raycast/src/lib/zen.ts:171–179  ·  view source on GitHub ↗
(
  vaultRoot: string | null,
  relPath: string,
)

Source from the content-addressed store, hash-verified

169}
170
171export function absoluteNotePath(
172 vaultRoot: string | null,
173 relPath: string,
174): string | null {
175 if (!vaultRoot) return null;
176 const segments = relPath.split("/").filter(Boolean);
177 if (segments.some((segment) => segment === "..")) return null;
178 return path.join(vaultRoot, ...segments);
179}
180
181export function titleFromPath(relPath: string): string {
182 const basename = path.posix.basename(relPath);

Callers 1

NoteActionsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected