rpm  6.0.91
The RPM Package Manager
Files
RPM IO API.

The RPM IO API (Fd_t is RPM equivalent to libc's FILE). More...

Collaboration diagram for RPM IO API.:

Files

file  rpmbase64.h
 
file  rpmfileutil.h
 
file  rpmio.h
 
file  rpmlog.h
 
file  rpmmacro.h
 
file  rpmsq.h
 
file  rpmsw.h
 
file  rpmurl.h
 

RPMIO Interface.

const char * Fstrerror (FD_t fd)
 
ssize_t Fread (void *buf, size_t size, size_t nmemb, FD_t fd)
 
ssize_t Fwrite (const void *buf, size_t size, size_t nmemb, FD_t fd)
 
int Fseek (FD_t fd, off_t offset, int whence)
 
off_t Ftell (FD_t fd)
 
int Fclose (FD_t fd)
 
FD_t Fdopen (FD_t ofd, const char *fmode)
 
FD_t Fopen (const char *path, const char *fmode)
 
int Fflush (FD_t fd)
 
int Ferror (FD_t fd)
 
int Fileno (FD_t fd)
 
int Fcntl (FD_t fd, int op, void *lip)
 
const char * Fdescr (FD_t fd)
 

RPMIO Utilities.

enum  fdOpX_e {
  FDSTAT_READ = 0, FDSTAT_WRITE = 1, FDSTAT_SEEK = 2, FDSTAT_CLOSE = 3,
  FDSTAT_DIGEST = 4, FDSTAT_MAX = 5
}
 
typedef enum fdOpX_e fdOpX
 
off_t fdSize (FD_t fd)
 
FD_t fdDup (int fdno)
 
FD_t fdLink (FD_t fd)
 
FD_t fdFree (FD_t fd)
 
rpmop fdOp (FD_t fd, fdOpX opx)
 
off_t ufdCopy (FD_t sfd, FD_t tfd)
 

Detailed Description

The RPM IO API (Fd_t is RPM equivalent to libc's FILE).

Typedef Documentation

typedef enum fdOpX_e fdOpX

Identify per-desciptor I/O operation statistics.

Enumeration Type Documentation

enum fdOpX_e

Identify per-desciptor I/O operation statistics.

Enumerator
FDSTAT_READ 

Read statistics index.

FDSTAT_WRITE 

Write statistics index.

FDSTAT_SEEK 

Seek statistics index.

FDSTAT_CLOSE 

Close statistics index

FDSTAT_DIGEST 

Digest statistics index.

Function Documentation

int Fclose ( FD_t  fd)

fclose(3) clone.

int Fcntl ( FD_t  fd,
int  op,
void *  lip 
)

fcntl(2) clone.

FD_t fdDup ( int  fdno)

dup(2) clone.

const char* Fdescr ( FD_t  fd)

Get informative description (eg file name) from fd for diagnostic output.

FD_t fdFree ( FD_t  fd)

Dereference a file descriptor. This does NOT close the file.

FD_t fdLink ( FD_t  fd)

Reference a file descriptor.

rpmop fdOp ( FD_t  fd,
fdOpX  opx 
)

File operation statistics.

FD_t Fdopen ( FD_t  ofd,
const char *  fmode 
)

fdopen(3) clone.

See Fopen() for details.

off_t fdSize ( FD_t  fd)

Return the size of the backing file of the descriptor.

int Ferror ( FD_t  fd)

ferror(3) clone.

int Fflush ( FD_t  fd)

fflush(3) clone.

int Fileno ( FD_t  fd)

fileno(3) clone.

FD_t Fopen ( const char *  path,
const char *  fmode 
)

fopen(3) clone with compression support.

The fmode parameter is based on that of fopen(3), but may also include a compression method (type and flags) to use when opening the stream. See rpm-payloadflags(7) manual for details.

ssize_t Fread ( void *  buf,
size_t  size,
size_t  nmemb,
FD_t  fd 
)

Like fread(3) but with read(3)-style return values.

int Fseek ( FD_t  fd,
off_t  offset,
int  whence 
)

fseek(3) clone.

const char* Fstrerror ( FD_t  fd)

strerror(3) clone.

off_t Ftell ( FD_t  fd)

ftell(3) clone.

ssize_t Fwrite ( const void *  buf,
size_t  size,
size_t  nmemb,
FD_t  fd 
)

Like fwrite(3) but with write(3)-style return values.

off_t ufdCopy ( FD_t  sfd,
FD_t  tfd 
)

Copy file descriptor into another.