Removes file paths or patterns from the project configuration.
Examples
collection <- file.path(tempdir(), "webrarian-withdraw-files")
catalog(collection)
#> ✔ Created directory /tmp/RtmpQU25pJ/webrarian-withdraw-files
#> ✔ Created _webrarian.yml
#> ✔ Added "_site/" and ".webrarian/" to .gitignore
#> ✔ Cataloged webrarian collection: "webrarian-withdraw-files"
#>
#> Next steps:
#> Move into the collection: `setwd("/tmp/RtmpQU25pJ/webrarian-withdraw-files")`
#> Acquire packages: `webrarian::acquire_package("dplyr")`
#> Acquire files: `webrarian::acquire_file("data/")`
#> Bind: `webrarian::bind()`
#> Reading room: `webrarian::reading_room()`
#> ℹ Or pass `path` to each call, e.g. `webrarian::bind(path =
#> "/tmp/RtmpQU25pJ/webrarian-withdraw-files")`
dir.create(file.path(collection, "data", "temp"), recursive = TRUE)
dir.create(file.path(collection, "scripts"))
writeLines("x,y\n1,2", file.path(collection, "data", "temp", "scratch.csv"))
writeLines("old <- TRUE", file.path(collection, "scripts", "old.R"))
acquire_file(c("data/", "scripts/old.R", "data/temp/"), path = collection)
#> ✔ Added 3 paths: data/, scripts/old.R, and data/temp/
withdraw_file("data/", path = collection)
#> ✔ Removed 1 path: data/
withdraw_file(c("scripts/old.R", "data/temp/"), path = collection)
#> ✔ Removed 2 paths: scripts/old.R and data/temp/
collection_files(collection)
#>
#> ── Collection files ────────────────────────────────────────────────────────────
#> Include: (none)
#> Exclude: "**/*.Rhistory" and "**/.DS_Store"
#> Mount point: /home/web_user
#>
#> ── 0 files bundled ──
#>
unlink(collection, recursive = TRUE)