Re: g_file_write()



On Sun, 2005-03-06 at 21:38 +0100, Soeren Sandmann wrote:
> Is it useful to add g_file_write() to complement
> g_file_get_contents()? It seems a feature many applications could use.
> 

Should it do the atomic write thing? (write to a temporary file
alongside the new file, then rename() to the final filename)

The minus is that you need double the size of the file to write it, but
the plus is that you aren't screwed if you run out of disk space mid-
overwrite.

Maybe at least delete the file if it fails mid-write?

Havoc





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]