Re: Can someone tell me how I can copy a binary file
- From: stian nixia no
- To: "Kristof Vansant" <de_lupus pandora be>
- Cc: gtk-list gnome org
- Subject: Re: Can someone tell me how I can copy a binary file
- Date: Mon, 7 Feb 2005 13:13:38 +0100 (CET)
> Can someone tell me how I can copy a binary file. Is glib not good for
> this? And how should the code be then. A code example would be really
> welcome! thx
Increase your buffer to be 4096 bytes atleast even much bigger like a
megabyte to lessen the number of iterations you need and number of
syscalls done.
You will need to loop reading/writing until you aren't able to read any
more data. If you are in Gtk it can be a good ide to call g_main_iterate
inside the loop, so the program doesn't freeze for the user.
Stian Skjelstad aka mw|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]