(destFilePath: string, content: string, log = true)
| 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) |
no test coverage detected