FileUtils.fileSetContents

Writes all of contents to a file named filename, with good error checking. If a file called filename already exists it will be overwritten. This write is atomic in the sense that it is first written to a temporary Since 2.8

class FileUtils
static
int
fileSetContents
(
string filename
,
string contents
)

Parameters

filename string

name of a file to write contents to, in the GLib file name encoding. [type filename]

contents string

string to write to the file. [array length=length][element-type guint8]

Return Value

Type: int

TRUE on success, FALSE if an error occurred

Throws

GException on failure.

Meta