LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   directory backup program in C (https://www.linuxquestions.org/questions/linux-newbie-8/directory-backup-program-in-c-4175483538/)

aditya9 11-05-2013 11:24 PM

directory backup program in C
 
Hi, i'm trying to make a directory backup program in C without using any system call.I'm able to read the "SOURCE" directory contents(it's subfolders and different types of files) but don't know to create the same directory in "DESTINATION". If anybody can kindly reply. It's an urgent task for me and i'm stuck midway.

pan64 11-06-2013 01:21 AM

would be nice to explain how do you want to implement anything without system calls. (does it mean to avoid the system() call itself or any call to the system).
Actually mkdir should work, it will create the destination dir, but it is a system call too....


What have you implemented?

aditya9 11-08-2013 10:27 PM

Quote:

Originally Posted by pan64 (Post 5059123)
would be nice to explain how do you want to implement anything without system calls. (does it mean to avoid the system() call itself or any call to the system).
Actually mkdir should work, it will create the destination dir, but it is a system call too....


What have you implemented?


Exactly...i've to avoid system() . Any other function is allowed like mkdir() , chdir() etc. First i've to recursively read a directory and it's contents and then copy the same in destination directory in the same format as of source directory.

pan64 11-09-2013 01:52 AM

here you can find some tips (for example): http://stackoverflow.com/questions/2...n-unix-using-c


All times are GMT -5. The time now is 08:07 AM.