(appId string, fileName string, edits []fileutil.EditSpec)
| 358 | } |
| 359 | |
| 360 | func ReplaceInAppFilePartial(appId string, fileName string, edits []fileutil.EditSpec) ([]fileutil.EditResult, error) { |
| 361 | if err := ValidateAppId(appId); err != nil { |
| 362 | return nil, fmt.Errorf("invalid appId: %w", err) |
| 363 | } |
| 364 | |
| 365 | appDir, err := GetAppDir(appId) |
| 366 | if err != nil { |
| 367 | return nil, err |
| 368 | } |
| 369 | |
| 370 | filePath, err := validateAndResolveFilePath(appDir, fileName) |
| 371 | if err != nil { |
| 372 | return nil, err |
| 373 | } |
| 374 | |
| 375 | return fileutil.ReplaceInFilePartial(filePath, edits) |
| 376 | } |
| 377 | |
| 378 | func RenameAppFile(appId string, fromFileName string, toFileName string) error { |
| 379 | if err := ValidateAppId(appId); err != nil { |
no test coverage detected