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

Method handleFileDeleted

src/utils/TaskManager.ts:207–220  ·  view source on GitHub ↗

* Handle file deletion

(path: string, prevCache: unknown)

Source from the content-addressed store, hash-verified

205 * Handle file deletion
206 */
207 private handleFileDeleted(path: string, prevCache: unknown): void {
208 this.pendingTaskInfoByPath.delete(path);
209 this.removeFilterIndexEntry(path);
210
211 // Cancel any pending debounced handlers
212 const timeoutId = this.debouncedHandlers.get(path);
213 if (timeoutId) {
214 window.clearTimeout(timeoutId);
215 this.debouncedHandlers.delete(path);
216 }
217
218 this.trigger("file-deleted", { path, prevCache });
219 this.trigger("data-changed");
220 }
221
222 /**
223 * Handle file rename

Callers 1

Calls 5

deleteMethod · 0.65
getMethod · 0.65
clearTimeoutMethod · 0.65
triggerMethod · 0.65

Tested by

no test coverage detected