(
path: string,
search: string,
replacement: string,
options?: StateSearchOptions
)
| 218 | } |
| 219 | |
| 220 | async replaceInFile( |
| 221 | path: string, |
| 222 | search: string, |
| 223 | replacement: string, |
| 224 | options?: StateSearchOptions |
| 225 | ): Promise<StateReplaceResult> { |
| 226 | const current = await this.readFile(path); |
| 227 | const result = replaceTextContent(current, search, replacement, options); |
| 228 | if (result.replaced > 0) { |
| 229 | await this.writeFile(path, result.content); |
| 230 | } |
| 231 | return result; |
| 232 | } |
| 233 | |
| 234 | async replaceInFiles( |
| 235 | pattern: string, |
nothing calls this directly
no test coverage detected