MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / readStorageConfig

Function readStorageConfig

apps/desktop/main/paths.ts:135–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133}
134
135function readStorageConfig(): StorageConfig {
136 const configPath = getStorageConfigPath()
137 if (!fs.existsSync(configPath)) return {}
138
139 try {
140 const content = fs.readFileSync(configPath, 'utf-8')
141 const data = JSON.parse(content) as StorageConfig
142 return data || {}
143 } catch (error) {
144 console.error('[Paths] Error reading storage config:', error)
145 }
146
147 return {}
148}
149
150function writeStorageConfig(config: StorageConfig): void {
151 const configPath = getStorageConfigPath()

Callers 8

getCustomDataDirFunction · 0.85
setCustomDataDirFunction · 0.85
clearPendingMigrationFunction · 0.85
markPendingDeleteDirFunction · 0.85
cleanupPendingDeleteDirFunction · 0.85
migrateToUnifiedDirsFunction · 0.85

Calls 3

getStorageConfigPathFunction · 0.85
parseMethod · 0.80
errorMethod · 0.65

Tested by

no test coverage detected