pd_trash()moves files or folders to the trash. It is the analogue ofgoogledrive::drive_trash().pd_untrash()restores them. It is the analogue ofgoogledrive::drive_untrash().pd_empty_trash()permanently deletes everything in/trash. It is the analogue ofgoogledrive::drive_empty_trash(). Photos in/photos-trashare not affected. Deletion happens asynchronously on the server.
The Proton Drive CLI identifies items in the trash by name. If the trash
holds several items with the same name, pd_untrash() refuses to guess
and asks you to resolve the ambiguity.
Usage
pd_trash(file, verbose = TRUE)
pd_untrash(file, verbose = TRUE)
pd_empty_trash(verbose = TRUE)Value
pd_trash() and pd_untrash() return a dribble of the affected
items, invisibly. pd_empty_trash() returns NULL, invisibly.
Examples
if (FALSE) { # \dontrun{
trashed <- pd_trash("data/old.csv")
pd_ls("/trash")
pd_untrash(trashed)
pd_empty_trash()
} # }