efs_batch
Batch file operations with atomic all-or-nothing execution, automatic rollback, and parallel support. Perform read, write, edit, delete, move, and list in one call.
Instructions
Execute multiple file operations atomically.
Features:
All operations succeed or all rollback
Automatic backups before modifications
Parallel execution when possible
Transaction support
All operations complete in a single call with automatic error handling.
Operations supported:
read: Read file
write: Create/modify file
edit: Find/replace in file
delete: Remove file
move: Move/rename file
list: List directory
Parameters:
operations: Array of operations to execute
atomic: Use transactions (all-or-nothing) (default: true)
parallel: Execute in parallel when safe (default: true)
Operation format: { op: 'read' | 'write' | 'edit' | 'delete' | 'move' | 'list', path: string, // op-specific fields... }
Examples:
Read multiple files: { operations: [ { op: 'read', path: 'file1.txt' }, { op: 'read', path: 'file2.txt' }, { op: 'read', path: 'file3.txt' } ], parallel: true }
Atomic refactoring: { operations: [ { op: 'edit', path: 'file1.js', oldText: 'oldName', newText: 'newName' }, { op: 'edit', path: 'file2.js', oldText: 'oldName', newText: 'newName' }, { op: 'move', source: 'old.js', destination: 'new.js' } ], atomic: true }
Project setup: { operations: [ { op: 'write', path: 'src/index.ts', content: '...' }, { op: 'write', path: 'package.json', content: '...' }, { op: 'write', path: 'tsconfig.json', content: '...' } ] }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| atomic | No | Use transactions (default: true) | |
| parallel | No | Execute in parallel (default: true) | |
| operations | Yes | Array of operations |