Re: how to copy folder using glib?




how to copy folder using glib?
AFAIK there're no specific function for this on glib.
You should make a loop reading all the files and copying them,
or try a system() call and pray for the best.

Actually, that's almost exactly how I'd suggest doing it.  Though possibly not with system(), since the 
system() call blocks.  There is a GTK way of running an external program.  But if install scripts can rely on 
the cp command, why can't you?  It probably handles problems that you've never even thought about.

That's a big part of the Linux phylosophy, IMHO.  Linux is excellent at utilising external programs to do 
various tasks.  The kernel itself uses a number of them; udevd is a recent example.  The kernel module 
auto-loader and hotplug systems both spawn external userspace programs to do their work.  The network monitor 
I use frequently spawns its own private DNS lookup program to perform lookups in the background so it doen't 
have to bother with them itself.  gkrellm's mail checking component happily accepts the path to a mailcheck 
command which it will run every few minutes instead of relying solely on its own internal mail checking code. 
 And the list goes on, and on, and on, and on.  My ICQ client uses an external command to play its sound 
effects.  By default, it uses "play", but it could be configured to use esd to play pre-loaded sound samples, 
something the author may never have even considered doing.


Fredderic

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



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