Buffer.toFile() - Mtax-Development/GML-OOP GitHub Wiki

Arguments

Name
Type
Optional
path
{string:path}
No
offset?
{int}
Yes
size?
{int}
Yes
async?
Yes

Returns

{int|undefined}

Description

Save the data of this Buffer to the specified file. A byte offset can be specified for where the operation will start and then continue until either the specified size in bytes was affected or the end of this Buffer is reached. This operation can be done asynchronously, which will prevent the game from stopping while in process. 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.

⚠️ **GitHub.com Fallback** ⚠️