Batch of patch operations to apply
Patch options including backup settings
OperationResult indicating success or failure
const patchBatch = {
filePath: '/path/to/file.txt',
operations: [
{ operation: 'insert', lineNumber: 5, content: 'New line' },
{ operation: 'replace', lineNumber: 10, content: 'Replaced line' },
{ operation: 'delete', lineNumber: 15, deleteCount: 2 }
]
};
const result = await patchFile(patchBatch, { createBackup: true });
Applies a batch of patch operations to a file