Re: .goutputstream-*?
- From: "A. Walton" <awalton gnome org>
- To: Wiky <wiiiky yeah net>
- Cc: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Re: .goutputstream-*?
- Date: Fri, 28 Feb 2014 23:12:39 -0800
On Fri, Feb 28, 2014 at 9:42 PM, Wiky <wiiiky yeah net> wrote:
Hello,I'm writing a program, which download file from web and save it.
I use GFileOutputStream to save the data.
httper->fOutput = g_file_replace(file, NULL, FALSE, G_FILE_CREATE_NONE,
NULL, NULL);
...
g_output_stream_write(G_OUTPUT_STREAM(httper->fOutput),
ptr, len, 0, NULL);
And now I find a series of files named .goutputstream-* in the directory.
What are they used for?
They are used to implement the g_file_replace() operation on local file
systems. The replace operation will overwrite an existing file, but tries
to do so atomically - first write the new file, then move the existing file
over the old file. In order to do that, it writes the new file with a
.goutputstream-XXXXXX temporary name. This is documented in
gio/glocalfileoutputstream.c.
If your program is leaving these files behind, it's probably a bug in your
program. The highly likely case is you forgot to close the stream.
-A. Walton
Sorry for my English
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]