pub fn copy_file_to_output_dir(
input_file_path: &str,
output_dir: &str,
subdir: Option<&str>,
base_dir: Option<&str>,
) -> Result<(), Error>
Expand description
Copies a file from the input path to the specified output directory, optionally creating a subdirectory.
§Arguments
input_file_path
- The path of the file to copy.output_dir
- The directory where the file should be copied.subdir
- An optional subdirectory within the output directory.base_dir
- An optional base directory to resolve relative paths.
§Returns
Returns a Result
indicating success or failure. If successful, the file is copied to the
output directory.