MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / getCanvasNodeFilePath

Function getCanvasNodeFilePath

src/editor/TaskCardNoteDecorations.ts:204–218  ·  view source on GitHub ↗
(node: CanvasNodeLike)

Source from the content-addressed store, hash-verified

202}
203
204function getCanvasNodeFilePath(node: CanvasNodeLike): string | null {
205 if (typeof node.filePath === "string" && node.filePath.trim()) {
206 return node.filePath;
207 }
208
209 if (typeof node.file === "string" && node.file.trim()) {
210 return node.file;
211 }
212
213 if (node.file instanceof TFile) {
214 return node.file.path;
215 }
216
217 return null;
218}
219
220export class TaskCardNoteDecorationsPlugin implements PluginValue {
221 private cachedTask: TaskInfo | null = null;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected