mirror of
https://gitlab.com/manzerbredes/ina260-zmq-publisher.git
synced 2025-04-07 04:16:26 +02:00
17 lines
No EOL
304 B
C
17 lines
No EOL
304 B
C
#include "utils.h"
|
|
|
|
void mkdirp(char *path){
|
|
char buffer[255]="mkdir -p ";
|
|
strcat(buffer,path);
|
|
system(buffer);
|
|
}
|
|
|
|
unsigned char dir_exists(char *path){
|
|
DIR* dir = opendir(path);
|
|
if (dir) {
|
|
/* Directory exists. */
|
|
closedir(dir);
|
|
return 1;
|
|
}
|
|
return 0;
|
|
} |