Recursively Delete Folder And Files In C

En curso Publicado hace 5 años Pagado a la entrega
En curso Pagado a la entrega

Can you recursively delete folder and files in C w/o using a call to system()? This is my current code, but I'd like to execute it w/o a call to system() if possible.

char* cmdPrefix = "rm -rf ";

char * cmd;

int len = (int)strlen("/localdir/");

cmd = malloc(len + 10);

memset(cmd, 0, len + 10);

sprintf(cmd, ("%s%s"), cmdPrefix, "//User//owner//Downloads//Test//");

system(cmd);

Programación en C Programación en C++ Arquitectura de software

Nº del proyecto: #18763989

Sobre el proyecto

7 propuestas Proyecto remoto Activo hace 5 años

Adjudicado a:

TechMagnetos

Hi there, I’d like to be considered for your C Project. I’m a strategic developer and programmer with more than 5-year experience and a strong background in developing desktop software, Artificial Intelligence, Databa Más

$15 USD en 1 día
(12 comentarios)
3.6

7 freelancers están ofertando un promedio de $26 por este trabajo

hbxfnzwpf

I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environ Más

$50 USD en 1 día
(175 comentarios)
7.2
kaloyan13

Yes, I can. Basically, you traverse the folder and delete every file. Then remove the directory itself.

$30 USD en 1 día
(394 comentarios)
7.2
gullzz

I assume you can use POSIX C here. Otherwise in windows RemoveDirectory winAPI. Somehow it’s possible to to what you have asked w/o using system().

$15 USD en 1 día
(1 comentario)
1.5
benmarbihamza

hello sir I have good experience in c and c++ under both windows and Linux I can do this project using visual studio codeblocks dev ... when I complete your project you can check and then you can accept my b Más

$20 USD en 1 día
(0 comentarios)
0.0
namorg

Hello! Using system calls easy but not safe. It possible to do this without system calls. If you have any questions please contact me. Thanks!

$25 USD en 1 día
(0 comentarios)
0.0