MCPcopy
hub / github.com/callumalpass/tasknotes / readFrontmatterFromFile

Method readFrontmatterFromFile

src/utils/TaskManager.ts:944–959  ·  view source on GitHub ↗
(file: TFile)

Source from the content-addressed store, hash-verified

942 }
943
944 private async readFrontmatterFromFile(file: TFile): Promise<Record<string, unknown> | null> {
945 try {
946 const content = await this.app.vault.read(file);
947 return this.parseFrontmatterFromContent(content, file.path);
948 } catch (error) {
949 tasknotesLogger.warn(
950 `TaskManager: Failed to read frontmatter fallback for ${file.path}`,
951 {
952 category: "validation",
953 operation: "taskmanager-read-frontmatter-fallback",
954 error: error,
955 }
956 );
957 return null;
958 }
959 }
960
961 private parseFrontmatterFromContent(
962 content: string,

Callers 1

getTaskInfoMethod · 0.95

Calls 3

warnMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected