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

Method save

src/storage/FileMappingStore.ts:32–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30 }
31
32 async save(): Promise<void> {
33 const data: FileMappingData = {
34 version: this.version,
35 mapping: Object.fromEntries(this.fileMapping),
36 lastUpdated: Date.now()
37 };
38
39 await this.app.vault.adapter.write(this.getMappingPath(), JSON.stringify(data, null, 2));
40 }
41
42 getMappedFiles(): string[] {
43 return Array.from(this.fileMapping.keys());

Callers 3

getStoragePathForFileMethod · 0.95
saveFileMappingMethod · 0.45
saveFlashcardDataMethod · 0.45

Calls 1

getMappingPathMethod · 0.95

Tested by

no test coverage detected