View source: R/item_rm_files.R
item_rm_files | R Documentation |
Removes existing files associated with an item.
NOTE: This function will not alter facets which can also
contain facets. To manipulate facets, the facet element of
a sciencebase item must be altered and updated with item_update
.
This function is the key way to remove files attached to SB items.
item_rm_files(sb_id, files, ...)
sb_id |
An |
files |
A character vector of file names to remove. If not supplied, defaults to removing all attached files. |
... |
Additional parameters are passed on to |
An updated object of class sbitem
## Not run:
res <- item_create(user_id(), "item456")
cat("foo bar", file = "foobar.txt")
item_append_files(res, "foobar.txt")
res <- item_get(res)
res$files[[1]]$name
res2 <- item_rm_files(res)
res2$files
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.