item_replace_files: Replace files associated with an item

View source: R/item_replace_files.R

item_replace_filesR Documentation

Replace files associated with an item

Description

replaces existing files associated with an item with a new one.

NOTE: This function will not replace files stored in facets. Until and if facet support is added, direct alteration of the science base item object is required to manipulate facets.

Usage

item_replace_files(sb_id, files, ..., all = FALSE, scrape_files = FALSE)

Arguments

sb_id

An sbitem object or a character ScienceBase ID corresponding to the item

files

A character vector of file paths

...

Additional parameters are passed on to GET, POST, HEAD, PUT.

all

A boolean indicating if all attached files should be removed before uploading new files. FALSE if only files with matching names should be replaced. If you wish to upload files with duplicate names, see item_append_files. Defaults to FALSE.

scrape_files

logical should the files be scraped for metadata? If TRUE, sciencebase will attempt to create extensions based on the files.

For example, for shapefiles, this will result in a shapefile extension to be returned as a facet of the sciencebase item. See item: "58069258e4b0824b2d1d422e" for an example.


USGS-R/sbtools documentation built on June 1, 2024, 9:47 p.m.