| move_directory | R Documentation |
Moves a directory and all its contents to a new location. Can optionally overwrite the destination if it already exists.
move_directory(from, to, overwrite_to = FALSE)
from |
Source directory path. |
to |
Destination directory path. |
overwrite_to |
Whether to overwrite existing destination (default: FALSE). |
The function:
Creates the destination directory if it doesn't exist
Copies all files and subdirectories recursively
Removes the source directory after successful copy
Fails if source doesn't exist or destination exists (unless overwrite_to=TRUE)
Nothing. Creates the destination directory and moves all contents.
## Not run:
# Move a directory
org::move_directory("old_dir", "new_dir")
# Move and overwrite existing directory
org::move_directory("old_dir", "new_dir", overwrite_to = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.