MCPcopy Create free account
hub / github.com/CatMuse/HiNote / deleteFileHighlights

Method deleteFileHighlights

src/storage/HiNoteDataManager.ts:136–146  ·  view source on GitHub ↗

* 删除文件的所有高亮数据 * @param filePath 文件路径

(filePath: string)

Source from the content-addressed store, hash-verified

134 * @param filePath 文件路径
135 */
136 async deleteFileHighlights(filePath: string): Promise<void> {
137 const storagePath = this.getStoragePathForFile(filePath);
138
139 try {
140 await this.app.vault.adapter.remove(storagePath);
141 this.fileMappingStore.delete(filePath);
142 await this.saveFileMapping();
143 } catch {
144 // 文件可能不存在,忽略错误
145 }
146 }
147
148 /**
149 * 处理文件重命名

Callers

nothing calls this directly

Calls 4

getStoragePathForFileMethod · 0.95
saveFileMappingMethod · 0.95
removeMethod · 0.80
deleteMethod · 0.80

Tested by

no test coverage detected