Edit a file by replacing string occurrences.
edit(
filePath: string,
oldString: string,
newString: string,
replaceAll: boolean
): MaybePromise<EditResult>| Name | Type | Description |
|---|---|---|
filePath* | string | Absolute file path |
oldString* | string | String to find and replace |
newString* | string | Replacement string |
replaceAll | boolean | If true, replace all occurrences (default: false) |