MCPcopy Create free account
hub / github.com/Xchristech2/Zenitsu-Bot / writeToFile

Function writeToFile

lib/lightweight_store.js:38–49  ·  view source on GitHub ↗
(filePath = STORE_FILE)

Source from the content-addressed store, hash-verified

36 },
37
38 writeToFile(filePath = STORE_FILE) {
39 try {
40 const data = JSON.stringify({
41 contacts: this.contacts,
42 chats: this.chats,
43 messages: this.messages
44 })
45 fs.writeFileSync(filePath, data)
46 } catch (e) {
47 console.warn('Failed to write store file:', e.message)
48 }
49 },
50
51 cleanupData() {
52 // Convert old format messages to new format if needed

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected