lovr.data.newBlob

Creates a new Blob.


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

Arguments

NameTypeDefaultDescription
sizenumber The 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
blobBlob The new Blob.

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

Arguments

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

Returns

NameTypeDescription
blobBlob The new Blob.

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

Arguments

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

Returns

NameTypeDescription
blobBlob The new Blob.

See also