rstudio / pins-r

Pin, discover, and share resources
https://pins.rstudio.com
Other
316 stars 62 forks source link

FR: add `force` option to `pin_delete.pins_board_url` #538

Closed atusy closed 3 years ago

atusy commented 3 years ago

Currently, pin_delete.pins_board_url is not allowed, and raises abort_board_read_only("board_url").

However, I think there are some cases people want to remove them for sure to reduce the disk space.

I think we should add force argument which behaves like below

hadley commented 3 years ago

Hmmm, but you're not really deleting the pin; you're deleting the cached version.

atusy commented 3 years ago

Oh yeah, that is true... Thanks.

Maybe users can delete caches easily (see code below). So, I'll be back if I come up with better solution to be included by pins package.

pins::board_url() |>
  pins::pin_download("https://example.com") |>
  dirname() |>
  unlink(recursive = TRUE)
hadley commented 3 years ago

Maybe something extending pins::cache_prune() ?

github-actions[bot] commented 2 years ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.