Skip to content

Instantly share code, notes, and snippets.

@elipousson
Last active April 26, 2024 18:08
Show Gist options
  • Save elipousson/4edc07fdd8f1f9e8660f3a451c30b2ad to your computer and use it in GitHub Desktop.
Save elipousson/4edc07fdd8f1f9e8660f3a451c30b2ad to your computer and use it in GitHub Desktop.
library(sharepointr)
drive <- get_sp_drive("<document library url>")
drive_files <- sp_dir_info(
drive = drive
)
drive_file_paths <- str_remove(drive_files[drive_files$isdir,]$name, "^/")
drive_file_info <- purrr::map_dfr(
cli::cli_progress_along(drive_file_paths),
\(x) {
sp_dir_info(
path = drive_file_paths[[x]],
drive = drive,
info = "partial",
recurse = TRUE
)
}
)
drive_file_info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment