The libmkdir is a library that offers abstraction for manipulation, generation and removal of directories in cross-platform C, completely single-header.
int dirmk(const char* name);Creates a directory (recursively or not). Returns 0 if successful.
int direxists(const char* name);int dirisemp(const char* name);int dirrm(const char* name);int dirmv(const char* old_name, const char* new_name);char* dirgetcur();int dirsetcur(const char* name);void dircnt(const char* path, signed long* it, short recursive);Counts directories in the specified path.
path: the path to the directory to scan.it: pointer to a signed long that will store the number of directories counted.recursive: if non-zero, counts directories recursively; if zero, counts only the immediate subdirectories.
void dircntall(const char* path, signed long* it, short recursive)Counts directories in the specified path and files and other logical blocks.
path: the path to the directory to scan.it: pointer to a signed long that will store the number of directories counted.recursive: if non-zero, counts directories recursively; if zero, counts only the immediate subdirectories.