This repository was archived by the owner on Jun 2, 2023. It is now read-only.

Description
sb_replace_files() doesn't delete omitted files, which means that if you change the file-posting command in remake.yml to omit a file that you've posted in the past, or if you rename a file, the old file/name won't be removed from ScienceBase. Could this slim-data-release repo provide file removal in such circumstances?
I discovered this by accident, when I pushed files from a new item-in-progress before repointing to a different SB item than what's provided by the template. The result at https://www.sciencebase.gov/catalog/item/5faaac68d34eb413d5df1f22 was that I overwrote fgdc_metadata.xml and added a new file, res_polygons.zip. I assume it's OK that I've corrupted the example data release...but I think we could see problems in real data releases using this template with old files never getting removed. Specifically, executing the code in my new repo didn't delete the old files spatial.zip and cars.csv, even though those were not included in my file list.
log/sb_posted_files.csv:
command: sb_replace_files(filename = target_name,
sb_id = I('5faaac68d34eb413d5df1f22'),
"out_data/res_polygons.zip",
"out_xml/fgdc_metadata.xml",
sources = "src/sb_utils.R")
