Function

Purpleutil_write_data_to_data_file

Declaration [src]

gboolean
purple_util_write_data_to_data_file (
  const char* filename,
  const char* data,
  gssize size
)

Description [src]

Write a string of data to a file of the given name in the Purple data directory ($HOME/.local/share/purple by default).

See purple_util_write_data_to_file()

Parameters

filename const char*
 

The basename of the file to write in the purple_data_dir.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
data const char*
 

A string of data to write.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
size gssize
 

The size of the data to save. If data is null-terminated you can pass in -1.

Return value

Returns: gboolean
 

TRUE if the file was written successfully. FALSE otherwise.