MCPcopy Create free account
hub / github.com/UNLINEARITY/Obsidian-CodeSpace / handleIgnoredPathDelete

Method handleIgnoredPathDelete

src/main.ts:440–456  ·  view source on GitHub ↗
(file: TFile | TFolder)

Source from the content-addressed store, hash-verified

438 }
439
440 private async handleIgnoredPathDelete(file: TFile | TFolder): Promise<void> {
441 const normalizedPath = this.normalizeIgnoredPath(file.path);
442 const filtered = this.settings.ignoredFiles.filter((path) => {
443 if (path === normalizedPath) {
444 return false;
445 }
446
447 return !(file instanceof TFolder && path.startsWith(`${normalizedPath}/`));
448 });
449
450 if (filtered.length === this.settings.ignoredFiles.length) {
451 return;
452 }
453
454 this.settings.ignoredFiles = this.normalizeIgnoredFiles(filtered);
455 await this.persistIgnoredFiles();
456 }
457
458 private isIgnoredPathMatch(path: string, ignoredPath: string): boolean {
459 if (path === ignoredPath) {

Callers 1

onloadMethod · 0.95

Calls 3

normalizeIgnoredPathMethod · 0.95
normalizeIgnoredFilesMethod · 0.95
persistIgnoredFilesMethod · 0.95

Tested by

no test coverage detected