drive_rm: Delete files from Drive

Description Usage Arguments Value See Also Examples

View source: R/drive_rm.R

Description

Caution: this will permanently delete your files! For a safer, reversible option, see drive_trash().

Usage

1
drive_rm(..., verbose = deprecated())

Arguments

...

One or more Drive files, specified in any valid way, i.e. as a dribble, by name or path, or by file id or URL marked with as_id(). Or any combination thereof. Elements are processed with as_dribble() and row-bound prior to deletion.

verbose

[Deprecated] This logical argument to individual googledrive functions is deprecated. To globally suppress googledrive messaging, use options(googledrive_quiet = TRUE) (the default behaviour is to emit informational messages). To suppress messaging in a more limited way, use the helpers local_drive_quiet() or with_drive_quiet().

Value

Logical vector, indicating whether the delete succeeded.

See Also

Wraps the files.delete endpoint:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Target one of the official example files to copy (then remove)
(src_file <- drive_example_remote("chicken.txt"))

# Create a copy, then remove it by name
src_file %>%
  drive_cp(name = "chicken-rm.txt")
drive_rm("chicken-rm.txt")

# Create several more copies
x1 <- src_file %>%
  drive_cp(name = "chicken-abc.txt")
drive_cp(src_file, name = "chicken-def.txt")
x2 <- src_file %>%
  drive_cp(name = "chicken-ghi.txt")

# Remove the copies all at once, specified in different ways
drive_rm(x1, "chicken-def.txt", as_id(x2))

googledrive documentation built on July 8, 2021, 5:07 p.m.