MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / isCompletedPath

Method isCompletedPath

src/utils/DependencyCache.ts:449–465  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

447 }
448
449 private isCompletedPath(path: string): boolean {
450 const cached = this.completedStatusByPath.get(path);
451 if (cached !== undefined) {
452 return cached;
453 }
454
455 const file = this.app.vault.getAbstractFileByPath(path);
456 if (!(file instanceof TFile)) {
457 this.completedStatusByPath.set(path, false);
458 return false;
459 }
460
461 const frontmatter = this.getFrontmatterForFile(file);
462 const completed = frontmatter ? this.isCompletedFrontmatter(frontmatter) : false;
463 this.completedStatusByPath.set(path, completed);
464 return completed;
465 }
466
467 private isCompletedFrontmatter(frontmatter: Record<string, unknown>): boolean {
468 const statusField = this.fieldMapper?.toUserField("status") || "status";

Callers 2

addDependencyLinkMethod · 0.95

Calls 5

getFrontmatterForFileMethod · 0.95
getAbstractFileByPathMethod · 0.80
getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected