(optional) Path to a directory to write object to. The name of the file will be determined from the
SystemMetada of the object (see details for more information).
The function will fail if a file with the same name already exists in the directory.
check
(optional) A logical value, if TRUE check if this object has been obsoleted by another object in DataONE.
Value
A path where the ouput file is written to.
Details
This method performs multiple underlying calls to the DataONE repository network.
CN.resolve() is called to locate the object on one or more repositories, and then each of these
is accessed until success at downloading the associated SystemMetadata for the object.
The SystemMetadata is used to assign a name to the file that is output to disk. If a fileName is specified in
the SystemMetadata, then the file output to disk will be named according to the SystemMetadata fileName.
If there is not a specified SystemMetadata fileName, the identifier will be used as the file name output to disk.
If the identifier is used as the file name, a file name extension will be determined using the SystemMetadata
formatID along with information from CNCore.listFormats(). If the SystemMetadata formatID is
"application/octet-stream" no extension will be written.