diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2023-07-16 12:12:49 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2023-07-16 12:12:49 +0200 |
| commit | c06d284b7016a02d33294be5793febd05e52839d (patch) | |
| tree | 18a9f688f32aa31c6569c969e353a5eb83ea3748 /src/utils.h | |
| parent | c5ca719d68731315118a4e269045603a25ff3b79 (diff) | |
Minor changes
Diffstat (limited to 'src/utils.h')
| -rw-r--r-- | src/utils.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/utils.h b/src/utils.h index 6c5741c..fafe99b 100644 --- a/src/utils.h +++ b/src/utils.h @@ -4,6 +4,7 @@ #include <unistd.h> #include <stdlib.h> #include <string.h> +#include <dirent.h> #define MIN_INTERVAL 30 #define INA260_SYSFS "/sys/kernel/ina260" @@ -28,5 +29,7 @@ #define INTERVAL_LAST(duration)\ (INTERVAL(INTERVAL((TIMESTAMP()),(duration))-1,(duration))) #define FILE_EXISTS(path) (access((path), F_OK) == 0) +#define DIR_EXISTS(path) (dir_exists(path)) -void mkdirp(char *path);
\ No newline at end of file +void mkdirp(char *path); +unsigned char dir_exists(char *path);
\ No newline at end of file |
