#include "utils.h" #include #include 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; } void askforbreak(char *break_file){ FILE * file; file = fopen(break_file, "r"); while(file){ printf("I am doing a break for %ds\n", BREAK_DURATION); sleep(BREAK_DURATION); fclose(file); file = fopen(break_file, "r"); } }