Skip to content

File Operations

Copy, move, and delete files.

3 modules

ModuleDescription
파일 복사파일을 다른 위치로 복사
파일 삭제파일 시스템에서 파일 삭제
파일 이동파일 이동 또는 이름 변경

Modules

파일 복사

file.copy

파일을 다른 위치로 복사

Parameters:

NameTypeRequiredDefaultDescription
sourcestringYes-Path to the source file
destinationstringYes-Path where the file will be saved
overwritebooleanNoFalseReplace the file if it already exists

Output:

FieldTypeDescription
copiedboolean복사됨
sourcestring복사됨
destinationstring복사됨
sizenumber소스

Example: Backup file

yaml
source: data/important.csv
destination: backup/important.csv
overwrite: true

Example: Duplicate configuration

yaml
source: config.yaml
destination: config.backup.yaml

파일 삭제

file.delete

파일 시스템에서 파일 삭제

Parameters:

NameTypeRequiredDefaultDescription
pathstringYes-Path to the file
ignore_missingbooleanNoFalseSkip without error if file does not exist

Output:

FieldTypeDescription
deletedboolean삭제됨
file_pathstring삭제됨

Example: Delete temporary file

yaml
file_path: /tmp/temp.txt
ignore_missing: true

Example: Delete log file

yaml
file_path: logs/app.log

파일 이동

file.move

파일 이동 또는 이름 변경

Parameters:

NameTypeRequiredDefaultDescription
sourcestringYes-Path to the source file
destinationstringYes-Path where the file will be saved

Output:

FieldTypeDescription
movedboolean이동됨
sourcestring이동됨
destinationstring이동됨

Example: Move file to archive

yaml
source: data/input.csv
destination: archive/input_2024.csv

Example: Rename file

yaml
source: report.txt
destination: report_final.txt

Released under the Apache 2.0 License.