library("dplyr")
library("googledrive")
drive_auth("drive-token.rds")

we can also pull out multiple files

list_of_ids <- drive_list(pattern = "test")$id[1:10]
list_of_files <- list_of_ids %>%
  purrr::map(drive_file)

change access

list_of_files <- list_of_files %>%
  purrr::map(drive_share, role = "reader", type = "anyone")

check access

list_of_files %>% purrr::map_chr("access")

delete them all!

list_of_files <- list_of_files %>% 
  purrr::map(drive_delete)


LucyMcGowan/googledrive documentation built on Jan. 14, 2024, 3:30 a.m.