1 #ifndef _WIMLIB_FILE_IO_H
2 #define _WIMLIB_FILE_IO_H
9 unsigned int is_pipe : 1;
14 full_read(struct filedes *fd, void *buf, size_t n);
17 full_pread(struct filedes *fd, void *buf, size_t nbyte, off_t offset);
20 full_write(struct filedes *fd, const void *buf, size_t n);
23 full_pwrite(struct filedes *fd, const void *buf, size_t count, off_t offset);
26 raw_pread(struct filedes *fd, void *buf, size_t nbyte, off_t offset);
29 raw_pwrite(struct filedes *fd, const void *buf, size_t count, off_t offset);
41 full_writev(struct filedes *fd, struct iovec *iov, int iovcnt);
48 filedes_seek(struct filedes *fd, off_t offset);
51 filedes_is_seekable(struct filedes *fd);
53 static inline void filedes_init(struct filedes *fd, int raw_fd)
60 static inline void filedes_invalidate(struct filedes *fd)
65 static inline void filedes_copy(struct filedes *dst, const struct filedes *src)
70 #define filedes_close(f) close((f)->fd)
73 filedes_valid(const struct filedes *fd)
78 #endif /* _WIMLIB_FILE_IO_H */