Result of any file operation containing comprehensive status information.
Provides detailed information about what was changed, created, or deleted during an operation, along with any errors or warnings encountered.
Handling operation results
const result: OperationResult = await fileOps.moveFile('old.md', 'new.md');if (result.success) {console.log(`Operation completed successfully`);console.log(`Modified ${result.modifiedFiles.length} files`);console.log(`Created ${result.createdFiles.length} files`);} else {console.error('Operation failed:');result.errors.forEach(error => console.error(` ${error}`));} Copy
const result: OperationResult = await fileOps.moveFile('old.md', 'new.md');if (result.success) {console.log(`Operation completed successfully`);console.log(`Modified ${result.modifiedFiles.length} files`);console.log(`Created ${result.createdFiles.length} files`);} else {console.error('Operation failed:');result.errors.forEach(error => console.error(` ${error}`));}
Whether the operation was successful
Files that were modified
Files that were created
Files that were deleted
Any errors that occurred
Warnings
Detailed changes made
Result of any file operation containing comprehensive status information.
Provides detailed information about what was changed, created, or deleted during an operation, along with any errors or warnings encountered.
Example
Handling operation results