// Author : Amit Sahrawat #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> Â #ifdef DEBUG #define TRC_SYSMNGR printf #else #define TRC_SYSMNGRÂ #endif #include <dirent.h> int deletepath(char *path) { Â struct dirent *d = NULL; DIR *dir = NULL; /* pointer to directory head*/ char buf[64]={0}; /* buffer to store the complete file/dir name*/ struct stat […]
Delete a directory recursively – Linux sample program
September 5th, 2008 | by Amit Sahrawat | published in Linux Sample Programs