File and directory management tool for creating, reading, writing, deleting, moving, copying, and searching files. Use this skill when the user needs to perform file operations, list directories, search by pattern or content, or get file metadata like size and modification time.
管理文件和目录的工具集。
python scripts/file_ops.py list <path> [--recursive] [--pattern "*.py"]
python scripts/file_ops.py read <file_path> [--encoding utf-8]
python scripts/file_ops.py write <file_path> --content "内容" [--append]
python scripts/file_ops.py copy <source> <destination>
python scripts/file_ops.py move <source> <destination>
python scripts/file_ops.py delete <path> [--recursive]
python scripts/file_ops.py search <directory> --pattern "*.py" [--content "search_text"]
python scripts/file_ops.py info <path>
所有操作返回 JSON 格式:
{
"success": true,
"operation": "list",
"data": {
"files": ["file1.py", "file2.py"],
"directories": ["subdir"],
"count": 3
}
}