Buffer.fromFile() - Mtax-Development/GML-OOP GitHub Wiki
Name |
Type |
Optional |
path |
{string:path} |
No |
offset? |
{int} |
Yes |
async_size? |
Yes |
{int|undefined}
Recreate a Buffer
from the specified file containing a previously saved file and load it to this Buffer
. A byte offset can be specified for where the operation will start. If no offset is specified, this Buffer
will be replaced with a Buffer
of Grow type and alignment of 1 byte. An async size can be specified, in which case this operation will be performed asynchronously and until the specified size in bytes loaded or the entire Buffer
if the size was specified as {all}
. If performed asynchronously, the file path will have "Default" added at the beginning of it automatically, also the ID
will be returned that will equal the value of the ID
key in SaveLoad asynchronous event. Otherwise {undefined}
will be returned.