Re: question about code



2008/8/29 A. Walton <awalton gnome org>
On Fri, Aug 29, 2008 at 6:35 AM, Nelson Benítez León
<nbenitezl gmail com> wrote:
> Hi!, I was searching in gio/gvfs code where it is the real copy function
> when you do a g_file_copy.. but can't find it.. I tried in glocalfile.c but
> g_local_file_copy just contains the following:
>

And if you look at g_file_copy(), you will see that it first attempts
to call the destination interface's copy function, then attempts the
source's copy function, and then if both of those fail, attempts the
fallback method, quite appropriately named file_copy_fallback() in
gfile.c. The fallback code does more or less what you'd expect (opens
the source stream, reads from the file, writes to the destination).
The local file implementation simply returns false so the fallback
code is always invoked. The GVFS fallback path is a bit more twisty,
and I could use an overview of that myself.

 Thanks very much, that's were I was looking for, I recall to see that function name but didn't look into it cause it was a fallback and so I thought it wasn't triggered in a normal situation, obviously I was wrong.


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