diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2023-07-15 10:31:36 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2023-07-15 10:31:36 +0200 |
| commit | cb13d2982c1d04f9e8f807554cfa787561e21092 (patch) | |
| tree | 6c5a1838cc53a2a4cc6bc8bbb02a343425ef8bad /src/utils.h | |
| parent | 4fbfae704413fdba2558e539dd6c9b1b4a5aec91 (diff) | |
Minor changes
Diffstat (limited to 'src/utils.h')
| -rw-r--r-- | src/utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/utils.h b/src/utils.h index c215431..2b523cb 100644 --- a/src/utils.h +++ b/src/utils.h @@ -1,4 +1,9 @@ +#pragma once + #include <time.h> +#include <unistd.h> +#include <stdlib.h> +#include <string.h> #define STR(symbol) #symbol #define STRINGIFY(symbol) STR(symbol) @@ -13,3 +18,7 @@ (INTERVAL(INTERVAL((timestamp),(duration))-1,(duration))) #define TIMESTAMP() (time(NULL)) + +#define FILE_EXISTS(path) (access((path), F_OK) == 0) + +void mkdirp(char *path);
\ No newline at end of file |
