lovr.data.newBlob

Creates a new Blob.

blob = lovr.data.newBlob(size, name)

Arguments

NameTypeDefaultDescription
sizenumberThe amount of data to allocate for the Blob, in bytes. All of the bytes will be filled with zeroes.
namestring''A name for the Blob (used in error messages)

Returns

NameTypeDescription
blobBlobThe new Blob.

blob = lovr.data.newBlob(contents, name)

Arguments

NameTypeDefaultDescription
contentsstringA string to use for the Blob's contents.
namestring''A name for the Blob (used in error messages)

Returns

NameTypeDescription
blobBlobThe new Blob.

blob = lovr.data.newBlob(source, name)

Arguments

NameTypeDefaultDescription
sourceBlobA Blob to copy the contents from.
namestring''A name for the Blob (used in error messages)

Returns

NameTypeDescription
blobBlobThe new Blob.

See also