diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-07-13 18:09:15 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-13 21:26:23 +0200 |
commit | a15d7ad07a5865f2f51e85d5e4e049922c50deec (patch) | |
tree | 851a49e189a568ad98e15fe6466796e701300546 /src/fileutils.h | |
parent | 9566646cd54a34c0dfe2dbdd89ee3858372a6c28 (diff) |
Finish add_rss (still need add rss of filename though)
Diffstat (limited to 'src/fileutils.h')
-rw-r--r-- | src/fileutils.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/fileutils.h b/src/fileutils.h index 6c514bb..2b9906c 100644 --- a/src/fileutils.h +++ b/src/fileutils.h @@ -1,10 +1,20 @@ #ifndef FILEUTILS_H #define FILEUTILS_H +#include <stddef.h> + const char* get_home_dir(); /* Returns 0 on success */ int file_get_content(const char *filepath, char **data, long *size); /* Returns 0 on success (if the directories are created or if the directories already exists) */ int create_directory_recursive(char *path); +/* Returns 0 if the file exists */ +int file_exists(const char *path); +/* Returns 0 on success */ +int create_lock_file(const char *path); + +int file_overwrite(const char *filepath, const char *data, size_t size); +int file_overwrite_in_dir(const char *dir, const char *filename, const char *data, size_t size); +void path_join(char *output, const char **components, int num_components); #endif |