Method
manipulateFile
(filePath: string, callback: Function)
Source from the content-addressed store, hash-verified
| 194 | } |
| 195 | |
| 196 | manipulateFile(filePath: string, callback: Function): FileSystem { |
| 197 | let fileContent = this.readFile(filePath) |
| 198 | |
| 199 | if(callback) { |
| 200 | fileContent = callback(fileContent) |
| 201 | } |
| 202 | |
| 203 | return this.writeFile(filePath, fileContent) |
| 204 | } |
| 205 | |
| 206 | readFileIfExists(filePath: string): string { |
| 207 | if(!this.fileExists(filePath)) return null |
Callers
nothing calls this directly
Tested by
no test coverage detected