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

Method writeFile

src/main/base/FileSystem.ts:92–102  ·  view source on GitHub ↗
(destFilePath: string, content: string, log = true)

Source from the content-addressed store, hash-verified

90 }
91
92 writeFile(destFilePath: string, content: string, log = true): FileSystem {
93 if(log) console.log('Writing File: ' + destFilePath)
94
95 this.makeFolderFromPathIfNotExists(destFilePath)
96
97 fs.writeFileSync(destFilePath, content)
98
99 fs.chmodSync(destFilePath, 0o644)
100
101 return this
102 }
103
104 makeFolderFromPathIfNotExists(fullPath: string): boolean {
105 let folderName = path.dirname(fullPath)

Callers 11

copyFileMethod · 0.95
writeProjectFileMethod · 0.95
writeJsonFileMethod · 0.95
manipulateFileMethod · 0.95
HandleIpcMessagesFunction · 0.45
generateFilesFunction · 0.45
writeGeneratedFileMethod · 0.45
saveCustomMethod · 0.45
readOrCreateFileMethod · 0.45

Calls 2

logMethod · 0.45

Tested by

no test coverage detected