Create a seaweed_volume object for interacting with a SeaweedFS volume
See https://github.com/chrislusf/seaweedfs/wiki/Volume-Server-API for details
new()Create client object for sending http requests to seaweed volume
seaweed_volume$new(seaweed_url)
seaweed_urlRoot URL of Seaweed volume
A new seaweed_volume object
upload_file()Upload a file to SeaweedFS.
seaweed_volume$upload_file(fid, path)
fidThe file ID from SeaweedFS. See
seaweed_master$assign()
to get a file ID. Or use
seaweed_master$upload_file() to upload
directly.
pathPath to file to upload
Size of uploaded file
upload_object()Upload an arbitrary R object to SeaweedFS.
This serializes R object to raw vector of bytes and then
saves bytes to SeaweedFS. To recover R object as saved use
seaweed_volume$download_object()
seaweed_volume$upload_object(fid, object)
fidThe file ID from SeaweedFS. See
seaweed_master$assign()
to get a file ID. Or use
seaweed_master$upload_file() to upload
directly.
objectThe object to upload
Size of uploaded object
upload_raw()Upload vector of raw bytes to SeaweedFS.
seaweed_volume$upload_raw(fid, raw)
fidThe file ID from SeaweedFS. See
seaweed_master$assign()
to get a file ID. Or use
seaweed_master$upload_file() to upload
directly.
rawThe object to upload
Size of uploaded object
read()Read file from SeaweedFS into R
seaweed_volume$read(fid)
fidSeaweedFS file ID to read
The file contents
download_file()Download file from SeaweedFS to a local path.
If called with an fid matching an R object uploaded via
seaweed_volume$upload_object()
then this will download raw bytes from SeaweedFS which can
be converted back to R object at later point using unserialize
or readRDS.
seaweed_volume$download_file(fid, path = tempfile())
fidSeaweedFS file ID to download
pathLocal file path to save to
The file path written to
download_object()Download and deserialize R object from SeaweedFS
If data downloaded from SeaweedFS is not unserializable (i.e. it was
written using
seaweed_volume$upload_file()) then
this will throw an error. See
seaweed_volume$download_file() to download as a file.
seaweed_volume$download_object(fid)
fidSeaweedFS file ID to download
The deserialized object
download_raw()Download raw bytes from SeaweedFS
seaweed_volume$download_raw(fid)
fidSeaweedFS file ID to download
The raw bytes
delete()Delete a file from SeaweedFS
seaweed_volume$delete(fid)
fidSeaweedFS file ID to delete
Nothing, called for side effects
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.