2014-07-30 08:43:51 +00:00
|
|
|
#ifndef __LIBFILE_H
|
|
|
|
#define __LIBFILE_H
|
|
|
|
|
|
|
|
int write_full(int fd, void *buf, size_t size);
|
|
|
|
int read_full(int fd, void *buf, size_t size);
|
|
|
|
|
|
|
|
char *read_file_line(const char *fmt, ...);
|
|
|
|
|
|
|
|
void *read_file(const char *filename, size_t *size);
|
|
|
|
|
2014-07-30 08:54:16 +00:00
|
|
|
int read_file_2(const char *filename, size_t *size, void **outbuf,
|
|
|
|
loff_t max_size);
|
|
|
|
|
2014-07-30 08:43:51 +00:00
|
|
|
int write_file(const char *filename, void *buf, size_t size);
|
|
|
|
|
|
|
|
int copy_file(const char *src, const char *dst, int verbose);
|
|
|
|
|
2014-10-23 19:46:01 +00:00
|
|
|
int copy_recursive(const char *src, const char *dst);
|
|
|
|
|
2014-10-08 12:11:55 +00:00
|
|
|
int compare_file(const char *f1, const char *f2);
|
|
|
|
|
2014-07-30 08:43:51 +00:00
|
|
|
#endif /* __LIBFILE_H */
|