MCPcopy Create free account
hub / github.com/VemtoOrg/vemto2 / readFileIfExists

Method readFileIfExists

src/main/base/FileSystem.ts:206–209  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

204 }
205
206 readFileIfExists(filePath: string): string {
207 if(!this.fileExists(filePath)) return null
208 return this.readFile(filePath)
209 }
210
211 readFile(filePath: string): string {
212 return fs.readFileSync(filePath, 'utf8')

Callers 6

HandleIpcMessagesFunction · 0.80
readGeneratedFileMethod · 0.80
constructorMethod · 0.80
readDefaultMethod · 0.80
constructorMethod · 0.80

Calls 2

fileExistsMethod · 0.95
readFileMethod · 0.95

Tested by

no test coverage detected