SaveFileAsync

Family: Platform · One form

What it does

SaveFileAsync writes a value: it saves rather than reads. It takes filename (a string), mime (a string) and data (a string), and answers an integer.

Syntax

SaveFileAsync(filename string, mime string, data string) → integer

Parameters

NameType
filenamestring
mimestring
datastring

Every form returns

integer

Example · generated

DO  Print(SaveFileAsync("assets/data.dat", "value", "value"))  Sync()LOOP

SaveFileAsync is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

Related commands

111 commands in Platform