Kyle R . Burton on Tue, 27 Nov 2001 19:00:14 +0100 |
> > Does anyone know which lib handles this? I don't want to do a > > bunch of 'systems' when I'm copying and making dirs. Is there a more > > elegant way to do this by calling a function or something? > afaik both QT and GTK have ability to do stuff like this. > QT is more C++ but it may be more bloat than you are looking for. > > I know there is a C way of doing this with unstd.h, but it has been years > since i have had the need to do that sort of thing. man 2 mkdir (create a directory - POSIX) man 2 unlink (remove a file - POSIX) man 3 remove (remove a file - POSIX/ANSI C) man 2 rename (rename a file/move a file - POSIX/ANSI C) I'm not sure about explicitly copying a file without writing a function of your own...though that should be fairly easy, it's inconvienient and won't take advantage of kernel side speed. The GNU fileutils sources for cp.c (copy.c) just opens both files, and uses a for loop. Based on that and a quick grep of /usr/src/linux/fs/*.c, I can't find a system call to do it. Seems like it would be more efficient if the data didn't have to cross between user/kernel space. <shrug> Kyle -- ------------------------------------------------------------------------------ Enter in. Be one with the object of contemplation if you wish to understand. Don't be an outside observer of life. Be life. -- T'ao-shan mortis@voicenet.com http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ ______________________________________________________________________ Philadelphia Linux Users Group - http://www.phillylinux.org Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce General Discussion - http://lists.phillylinux.org/mail/listinfo/plug
|
|