文件
file_copy
复制文件。
file_move
移动(重命名)文件。
file_delete
删除文件。
file_rename
在同一目录内重命名文件。
file_exists
检查文件是否存在并保存结果。
- file_exists:
path: output/result.xlsx
save_as: file_found
- if:
cond: "file_found == true"
then:
- type: "File is ready"
file_read
将文本文件读取到变量中。
file_write
将字符串写入文件。
- file_write:
path: output/log.txt
content: "Run completed at {{ timestamp }}"
append: false # true 表示追加(默认: false)
file_list
列出目录中的文件,可选按 glob 模式过滤。