chibipub

experimental activitypub node in C
git clone git://jb55.com/chibipub
Log | Files | Refs | README | LICENSE

io.h (466B)


      1 
      2 #ifndef CHIBIPUB_IO
      3 #define CHIBIPUB_IO
      4 
      5 #include <stddef.h>
      6 #include <stdio.h>
      7 
      8 int map_file(const char *filename, unsigned char **p, size_t *flen);
      9 
     10 int read_fd(FILE *fd, unsigned char *buf, int buflen, int *written);
     11 int read_file(const char *filename, unsigned char *out, int out_len, int *written);
     12 int write_file(const char *filename, unsigned char *data, size_t len);
     13 int dir_exists(const char *path);
     14 int mkdirp(const char *path);
     15 
     16 #endif /* CHIBIPUB_IO */