pd_mv()moves a file or folder into a different folder, and can rename it at the same time. It is the analogue ofgoogledrive::drive_mv().pd_rename()renames a file or folder in place. It is the analogue ofgoogledrive::drive_rename().
Items can only be moved within the same owner's drive. To move between
your files and a folder someone shared with you, use pd_cp() and then
pd_trash().
Usage
pd_mv(file, path = NULL, name = NULL, overwrite = FALSE)
pd_rename(file, name, overwrite = FALSE, verbose = TRUE)Arguments
- file
The file or folder to move or rename, as a path, an ID marked with
as_id(), or a one-row dribble.- path
Destination folder. If
NULL, the item stays where it is.- name
New name. If
NULL, the name is unchanged.- overwrite
What to do if something called
namealready exists inpath.FALSE(the default) is an error;TRUEmoves the existing item to the trash first.- verbose
If
TRUE, report what happened.
Value
A one-row dribble for the item, with updated metadata, invisibly.