diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2020-09-05 14:37:33 +0200 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2020-09-05 14:38:05 +0200 |
commit | 2eb15227c79e3a08ce8eed80d41ef07da5b90a78 (patch) | |
tree | b35b4df5857ff4ca9722e8f634707a94be4cdcdc /src/common.h | |
parent | e83fafc1895d72f9c1e4bd701c90b325629ea305 (diff) | |
download | polecat-2eb15227c79e3a08ce8eed80d41ef07da5b90a78.tar.gz polecat-2eb15227c79e3a08ce8eed80d41ef07da5b90a78.zip |
move fs related functions to common, add more file related functions
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/common.h b/src/common.h index fba45cd..f33c152 100644 --- a/src/common.h +++ b/src/common.h @@ -3,6 +3,8 @@ #include <stddef.h> #include <stdint.h> +#include <stdbool.h> +#include <sys/stat.h> #define ARRAY_LEN(arr) sizeof(arr) / sizeof(arr[0]) @@ -10,6 +12,16 @@ #define DXVK_API "https://api.github.com/repos/lutris/dxvk/releases" #define INSTALLER_API "https://lutris.net/api/installers/" +#ifndef NAME +#warning "no name specified, setting it to polecat" +#define NAME "polecat" +#endif + +#ifndef VERSION +#warning "no version specified, setting it to 0.0.0" +#define VERSION "0.0.0" +#endif + #define USER_AGENT NAME "/" VERSION #define USAGE_STR "Usage: " NAME @@ -27,4 +39,10 @@ struct Command { void print_help(const struct Command*, size_t); -#endif
\ No newline at end of file +struct stat getStat(const char* path); +bool isFile(const char*); +bool isDir(const char*); + +void makeDir(const char* path); + +#endif |