file_archive
Compress files and directories into ZIP, TAR, GZ, or TAR.GZ archives, or extract content from these archive formats using secure parameters to prevent command injection.
Instructions
文件压缩/解压:支持ZIP、TAR、GZ、TAR.GZ格式。使用spawn安全参数,防止命令注入。
示例:压缩目录 { "operation": "compress", "source": "project", "destination": "backup.zip", "format": "zip" } 示例:解压文件 { "operation": "extract", "source": "archive.tar.gz", "destination": "./extracted" }
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | 操作类型:compress(压缩)、extract(解压) | |
| source | Yes | 源文件或源目录路径 | |
| destination | No | 目标文件或目标目录路径 | |
| format | No | 压缩格式:zip、tar、gz、tar.gz | |
| output_format | No | 输出格式:text(纯文本)、json(结构化JSON)、both(两者兼有) |