Re: g_file_write()
- From: Matthias Clasen <mclasen redhat com>
- To: muppet <scott asofyet org>
- Cc: GTK Dev List <gtk-devel-list gnome org>, Soeren Sandmann <sandmann daimi au dk>
- Subject: Re: g_file_write()
- Date: Mon, 07 Mar 2005 10:18:48 -0500
On Mon, 2005-03-07 at 08:51 -0500, muppet wrote:
> On Mar 6, 2005, at 6:21 PM, Soeren Sandmann wrote:
>
> > http://www.daimi.au.dk/~sandmann/filewrite.patch
>
> > + * Writes all of @contents to a file named @filename, with good error
> > checking. If
> > + * a file called @filename already exists it will be overwritten.
>
> It may be worth noting in the docs that the function does an atomic
> write, and that the atomic write scheme will break a hard link (since
> the new file doesn't have the same inode as the old). Without this
> information, you may have confused developers / users finding it out
> the hard way.
>
> In this sense, at least just s/overwritten/replaced/ would work.
>
You might also mention that the atomic write may loose
permissions/ACLS/EAs. And I think we really need a name that doesn't
evoke write(). How about g_file_put_contents() or
g_file_replace_contents() ?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]