15 #include <rpm/rpmtypes.h>
16 #include <rpm/rpmsw.h>
24 typedef const struct FDIO_s * FDIO_t;
28 * \name RPMIO Interface.
34 const char * Fstrerror(FD_t fd);
39 ssize_t Fread(void * buf, size_t size, size_t nmemb, FD_t fd);
44 ssize_t Fwrite(const void * buf, size_t size, size_t nmemb, FD_t fd);
49 int Fseek(FD_t fd, off_t offset, int whence);
63 FD_t Fdopen(FD_t ofd, const char * fmode);
68 FD_t Fopen(const char * path,
90 int Fcntl(FD_t fd, int op, void *lip);
93 * Get informative description (eg file name) from fd for diagnostic output.
95 const char * Fdescr(FD_t fd);
98 * \name RPMIO Utilities.
103 off_t fdSize(FD_t fd);
107 FD_t fdDup(int fdno);
111 FD_t fdLink(FD_t fd);
115 FD_t fdFree(FD_t fd);
119 off_t ufdCopy(FD_t sfd, FD_t tfd);
122 * Identify per-desciptor I/O operation statistics.
124 typedef enum fdOpX_e {
125 FDSTAT_READ = 0, /*!< Read statistics index. */
126 FDSTAT_WRITE = 1, /*!< Write statistics index. */
127 FDSTAT_SEEK = 2, /*!< Seek statistics index. */
128 FDSTAT_CLOSE = 3, /*!< Close statistics index */
129 FDSTAT_DIGEST = 4, /*!< Digest statistics index. */
136 rpmop fdOp(FD_t fd, fdOpX opx);