filesystem
Implements typical filesystem functionality, such as copying files and directories.
copy_dir ¶
Copy a directory.
Recursively copy the specified directory to the specified destination directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
src_dir
|
DirectoryTreeArtifact | str
|
The source directory. If |
required |
dst_dir
|
DirectoryArtifact | str
|
The destination directory. If |
required |
Example:
copy_file ¶
Copy a file.
Copy the specified file to the specified directory. The copy can be given a new name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
src_file
|
FileArtifact | str
|
Source file path (absolute, or relative to setting |
required |
dst_dir
|
DirectoryArtifact | StringArtifact | str
|
Destination directory path (absolute, or relative to setting |
required |
new_file_name
|
str | None
|
(Optional) New name for the copied file. |
None
|
make_directory ¶
Make a directory, and any necessary non-existent parent directories.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rel_path
|
str
|
The path of the directory to be created, relative to the current build directory. |
required |