Generator.toFile

Creates a JSON data stream and puts it inside filename, overwriting the file's current contents.

This operation is atomic, in the sense that the data is written to a temporary file which is then renamed to the given filename.

class Generator
bool
toFile
(
string filename
)

Parameters

filename string

the path to the target file

Return Value

Type: bool

true if saving was successful.