This function copies files from a right (source) directory to a left (destination) directory based on a provided data frame containing file paths and synchronization status.
copy_files_to_left(left_dir, right_dir, files_to_copy, recurse = TRUE)Invisible TRUE upon successful completion of the file copying process.
Path of the left (destination) directory.
Path of the right (source) directory.
Data frame containing paths of files to copy and their synchronization status.
Logical, default is TRUE.
If TRUE: Files are copied into corresponding subdirectories in the left directory. If a subdirectory doesn't exist in the left directory, it will be created.
If FALSE: Files are copied to the top level of the left directory.
The function performs the following steps:
Checks if the source (right) and destination (left) directories exist and creates the destination directory if it doesn't already exist.
Copies files from the right directory to the corresponding subdirectory in the left directory based on the provided file paths.