Anklang C++ API 0.0.0
Loading...
Searching...
No Matches
Blob

#include "blob.hh"

Public Member Functions

Blob ()
Blob (const String &auto_url)
const uint8 *bytes ()
const char *data ()
Stringname ()
operator bool () const
size_tsize ()
Stringstring ()

Static Public Member Functions

static Blobfrom_file (const String &filename)
static Blobfrom_url (const String &url)

Detailed Description

Binary large object storage container.

Constructor & Destructor Documentation

Blob() [1/2]

Blob ( )
explicit

Construct an empty Blob.

Blob() [2/2]

Blob ( const String & auto_url)
explicit

Construct Blob from url or filename (auto detected).

Member Function Documentation

name()

String name ( )

Retrieve the Blob's filename or url.

data()

const char * data ( )

Retrieve the Blob's data.

bytes()

const uint8 * bytes ( )

Retrieve the Blob's data as uint8 buffer.

size()

size_t size ( )

Retrieve the Blob's data size in bytes.

string()

String string ( )

Copy Blob data into a zero terminated string.

from_file()

Blob from_file ( const String & filename)
static

Create Blob by loading from filename.

from_url()

Blob from_url ( const String & url)
static

Create Blob by opening a url.

operator bool()

operator bool ( ) const
explicit

Checks if the Blob contains accessible data.