-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd1cebe
commit 8ff3dab
Showing
3 changed files
with
168 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
title: "Managing files and folders" | ||
--- | ||
|
||
```{r, include = FALSE} | ||
knitr::opts_chunk$set( | ||
collapse = TRUE, | ||
eval = FALSE, | ||
comment = "#>" | ||
) | ||
``` | ||
|
||
```{r setup} | ||
library(sharepointr) | ||
library(tidyverse) | ||
``` | ||
|
||
## Common uses | ||
|
||
Deleting empty directories: | ||
|
||
```{r} | ||
url <- "https://bmore.sharepoint.com/:f:/r/sites/DOP-ALL/Shared%20Documents/LUUD?csf=1&web=1&e=g00uHf" | ||
luud_items <- sp_dir_info(url, recurse = TRUE) | ||
``` | ||
|
||
Workspaces | ||
|
||
- 40' setback from ROW for E-2 districts | ||
|
||
|
||
```{r} | ||
luud_items |> | ||
dplyr::mutate( | ||
filename = if_else( | ||
type == "file", | ||
fs::path_file(name), | ||
NA_character_ | ||
), | ||
fileext = fs::path_ext(name), | ||
dir_path = if_else( | ||
type == "file", | ||
fs::path_dir(name), | ||
NA_character_ | ||
), | ||
dir_name = basename(dir_path) | ||
) |> | ||
View() | ||
openxlsx2::write_xlsx("LUUD-Items.xlsx") | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.