写入内容到文件。文件不存在则自动创建,已存在则覆盖。自动创建父目录。Documentation Index
Fetch the complete documentation index at: https://docs.cowagent.ai/llms.txt
Use this file to discover all available pages before exploring further.
依赖
无额外依赖,默认可用。参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
path | string | 是 | 文件路径 |
content | string | 是 | 要写入的内容 |
使用场景
- 创建新的代码文件或脚本
- 生成配置文件
- 保存处理结果
单次写入不应超过 10KB。对于大文件,建议先创建骨架,再使用 edit 工具分块添加内容。
