gboolean g_file_set_contents ( const gchar* filename, const gchar* contents, gssize length, GError** error )
Writes all of
contents to a file named
filename. This is a convenience
wrapper around calling
flags set to
G_FILE_SET_CONTENTS_CONSISTENT | G_FILE_SET_CONTENTS_ONLY_EXISTING and
mode set to
Name of a file to write
contentsto, in the GLib file name encoding.
The data is owned by the caller of the function. The value is a file system path, using the OS encoding.
Type: An array of
String to write to the file.
The length of the array is specified in the
The data is owned by the caller of the function.
contents, or -1 if
contentsis a nul-terminated string.
The return location for a recoverable error.
The argument can be
If the return location is not
NULL, then you must initialize it to a
The argument will left initialized to
NULLby the function if there are no errors.
In case of error, the argument will be set to a newly allocated
GError; the caller will take ownership of the data, and be responsible for freeing it.