update_object | R Documentation |
This is a convenience wrapper around dataone::updateObject()
which copies in
fields from the old object's System Metadata such as the rightsHolder and
accessPolicy and updates only what needs to be changed.
update_object(mn, pid, path, format_id = NULL, new_pid = NULL, sid = NULL)
mn |
(MNode) The Member Node to update the object on. |
pid |
(character) The PID of the object to update. |
path |
(character) The full path to the file to update with. |
format_id |
(character) Optional. The format ID to set for the object.
When not set, |
new_pid |
(character) Optional. Specify the PID for the new object. Defaults to automatically generating a new, random UUID-style PID. |
sid |
(character) Optional. Specify a Series ID (SID) to use for the new object. |
(character) The PID of the updated object.
## Not run:
cn <- CNode("STAGING2")
mn <- getMNode(cn,"urn:node:mnTestKNB")
pid <- "urn:uuid:23c7cae4-0fc8-4241-96bb-aa8ed94d71fe"
my_path <- "/home/Documents/myfile.csv"
new_pid <- update_object(mn, pid, my_path, format_id = "text/csv")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.