| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #ifndef COMMON_IO_UTILS_H |
| #define COMMON_IO_UTILS_H |
| |
| #include <sys/types.h> /* POSIX */ |
| #include <sys/stat.h> /* Gnulib/POSIX */ |
| #include <stdio.h> /* Gnulib/C89 */ |
| #include "common.h" |
| #include "llist.h" |
| |
| bool file_exists(const char *file); |
| #define is_directory(x) S_ISDIR(stat_mode(x)) |
| mode_t stat_mode(const char *file); |
| off_t file_size(const char *file); |
| char *create_temporary_file(char *base); |
| #if 0 |
| char *read_line(FILE *in); |
| char *backticks(const char *program, char *const args[], int *rc); |
| #endif |
| LList *read_directory(const char *dir); |
| |
| |
| int fskip(FILE *file, uint32_t bytes); |
| int fpad(FILE *file, char byte, uint32_t bytes); |
| |
| #endif |