Description Details Public fields Methods
Create a kelp object for interacting with SeaweedFS.
Create a kelp object for interacting with SeaweedFS.
This is a slightly higher level abstraction than seaweed_master() and
seaweed_volume().
seaweed_urlBase URL for seaweed master.
new()Create client object for sending http requests to seaweed
kelp$new(seaweed_url)
seaweed_urlRoot URL of Seaweed
A new kelp object
upload_file()Upload file to SeaweedFS
kelp$upload_file(path, collection = NULL)
pathPath to file to be uploaded
collectionCollection name, acts as a namespace for files.
The uploaded file ID.
download_file()Download file from SeaweedFS
If called with an id matching an R object uploaded via
kelp$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.
kelp$download_file(id, path = tempfile(), collection = NULL)
idSeaweedFS file ID to read
pathPath to download file to
collectionOptional collection name this file belongs to.
The file contents
upload_object()Upload 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()
kelp$upload_object(object, collection = NULL)
objectObject to be uploaded
collectionCollection name, acts as a namespace.
The uploaded file ID.
download_object()Download arbitrary R object from SeaweedFS
If data downloaded from SeaweedFS is not unserializable (i.e. it was
written using
kelp$upload_file()) then
this will throw an error. See
kelp$download_file() to download as a file.
kelp$download_object(id, collection = NULL)
idSeaweedFS file ID to download
collectionOptional collection name this file belongs to.
The R object.
upload_raw()Upload vector of raw bytes to SeaweedFS.
kelp$upload_raw(raw, collection = NULL)
rawObject to be uploaded
collectionCollection name, acts as a namespace.
The uploaded file ID.
download_raw()Download vector of raw bytes from SeaweedFS
kelp$download_raw(id, collection = NULL)
idSeaweedFS file ID to download
collectionOptional collection name this file belongs to.
Vector of raw bytes.
delete()Delete file from SeaweedFS
kelp$delete(id, collection = NULL)
idSeaweedFS file ID to delete
collectionOptional collection name this file belongs to.
This helps speedup lookup - only the single id will be deleted.
See
kelp$delete_collection() to remove an entire
collection.
Nothing, called for side effects
delete_collection()Delete a collection of files
kelp$delete_collection(collection)
collectionCollection name.
Nothing, called for side effects
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.