diff options
Diffstat (limited to 'src/utils.h')
-rw-r--r-- | src/utils.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/utils.h b/src/utils.h index aaac730..9936d97 100644 --- a/src/utils.h +++ b/src/utils.h @@ -78,15 +78,23 @@ void fork_to_background (void); char *aprintf (const char *, ...) GCC_FORMAT_ATTR (1, 2); char *concat_strings (const char *, ...); +typedef struct file_stat_s { + int access_err; /* Error in accecssing file : Not present vs permission */ + ino_t st_ino; /* st_ino from stats() on the file before open() */ + dev_t st_dev; /* st_dev from stats() on the file before open() */ +} file_stats_t; + void touch (const char *, time_t); int remove_link (const char *); -bool file_exists_p (const char *); +bool file_exists_p (const char *, file_stats_t *); bool file_non_directory_p (const char *); wgint file_size (const char *); int make_directory (const char *); char *unique_name (const char *, bool); FILE *unique_create (const char *, bool, char **); FILE *fopen_excl (const char *, int); +FILE *fopen_stat (const char *, const char *, file_stats_t *); +int open_stat (const char *, int, mode_t, file_stats_t *); char *file_merge (const char *, const char *); int fnmatch_nocase (const char *, const char *, int); @@ -141,7 +149,7 @@ void xsleep (double); #define BASE64_LENGTH(len) (4 * (((len) + 2) / 3)) size_t wget_base64_encode (const void *, size_t, char *); -ssize_t wget_base64_decode (const char *, void *); +ssize_t wget_base64_decode (const char *, void *, size_t); #ifdef HAVE_LIBPCRE void *compile_pcre_regex (const char *); |