Add warning for utils_write_file() that g_file_set_contents() is a better choice because it handles disk exhaustion safely.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5454 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
cba09d5e8d
commit
66d8cbec81
@ -217,10 +217,14 @@ gboolean utils_is_opening_brace(gchar c, gboolean include_angles)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes the given @a text into a file with @a filename.
|
* Writes @a text into a file named @a filename.
|
||||||
* If the file doesn't exist, it will be created.
|
* If the file doesn't exist, it will be created.
|
||||||
* If it already exists, it will be overwritten.
|
* If it already exists, it will be overwritten.
|
||||||
*
|
*
|
||||||
|
* @warning You should use @c g_file_set_contents() instead if you don't need
|
||||||
|
* file permissions and other metadata to be preserved, as that always handles
|
||||||
|
* disk exhaustion safely.
|
||||||
|
*
|
||||||
* @param filename The filename of the file to write, in locale encoding.
|
* @param filename The filename of the file to write, in locale encoding.
|
||||||
* @param text The text to write into the file.
|
* @param text The text to write into the file.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user