Link Search Menu Expand Document

FileAsset

A type of Asset generated from a file

Constructor

 my_asset = FileAsset(path, load)

Arguments

Name Type Description
path string The path to the file
load boolean If true, the file is loaded into memory immediately. Otherwise the file is read whenever data is needed.

Returns

Type Description
FileAsset The generated FileAsset.

Methods

fileasset:path ()

Get the path to a FileAsset

 path = FileAsset:path()

Arguments

None

Returns

Type Description
string The path to the FileAsset.

fileasset:size ()

Get the size (in bytes) of a FileAsset.

 path = FileAsset:size()

Arguments

None

Returns

Type Description
string The size, in bytes, of the FileAsset.