rpm
4.16.0
|
File archive (aka payload) API. More...
Go to the source code of this file.
Macros | |
#define | RPMERR_CHECK_ERRNO -32768 |
Functions | |
char * | rpmfileStrerror (int rc) |
Return formatted error message on payload handling failure. More... | |
rpmfi | rpmfiNewArchiveWriter (FD_t fd, rpmfiles files) |
Get new file iterator for writing the archive content. More... | |
rpmfi | rpmfiNewArchiveReader (FD_t fd, rpmfiles files, int itype) |
Get new file iterator for looping over the archive content. More... | |
int | rpmfiArchiveClose (rpmfi fi) |
Close payload archive. More... | |
rpm_loff_t | rpmfiArchiveTell (rpmfi fi) |
Return current position in payload archive. More... | |
size_t | rpmfiArchiveWrite (rpmfi fi, const void *buf, size_t size) |
Write content into current file in archive. More... | |
int | rpmfiArchiveWriteFile (rpmfi fi, FD_t fd) |
Write content from given file into current file in archive. More... | |
ssize_t | rpmfiArchiveRead (rpmfi fi, void *buf, size_t size) |
Read content from current file in archive. More... | |
int | rpmfiArchiveHasContent (rpmfi fi) |
Has current file content stored in the archive. More... | |
int | rpmfiArchiveReadToFile (rpmfi fi, FD_t fd, int nodigest) |
Write content from current file in archive to a file. More... | |
File archive (aka payload) API.
Definition in file rpmarchive.h.
#define RPMERR_CHECK_ERRNO -32768 |
Definition at line 9 of file rpmarchive.h.
enum rpmfilesErrorCodes |
Error codes for archive and file handling.
Definition at line 14 of file rpmarchive.h.
int rpmfiArchiveClose | ( | rpmfi | fi | ) |
Close payload archive.
fi | file info |
int rpmfiArchiveHasContent | ( | rpmfi | fi | ) |
Has current file content stored in the archive.
fi | file info @ return 1 for regular files but 0 for hardlinks without content |
ssize_t rpmfiArchiveRead | ( | rpmfi | fi, |
void * | buf, | ||
size_t | size | ||
) |
Read content from current file in archive.
fi | file info |
buf | pointer to buffer |
size | number of bytes to read |
Write content from current file in archive to a file.
fi | file info |
fd | file descriptor of file to write to |
nodigest | omit checksum check if 1 |
rpm_loff_t rpmfiArchiveTell | ( | rpmfi | fi | ) |
Return current position in payload archive.
fi | file info |
size_t rpmfiArchiveWrite | ( | rpmfi | fi, |
const void * | buf, | ||
size_t | size | ||
) |
Write content into current file in archive.
fi | file info |
buf | pointer to content |
size | number of bytes to write |
Write content from given file into current file in archive.
fi | file info |
fd | file descriptor of file to read |
char* rpmfileStrerror | ( | int | rc | ) |
Return formatted error message on payload handling failure.
rc | error code |
Get new file iterator for looping over the archive content.
Returned rpmfi visites files in the order they are read from the payload. Content of the regular files can be retrieved with rpmfiArchiveRead() or rpmfiArchiveReadToFile() when they are visited with rpmfiNext(). rpmfiSetFX() is not supported for this type of iterator.
fd | file |
files | file info |
itype | how to handle hard links. See rpmFileIter. |
Get new file iterator for writing the archive content.
The returned rpmfi will only visit the files needing some content. You need to provide the content using rpmfiArchiveWrite() or rpmfiArchiveWriteFile(). Make sure to close the rpmfi with rpmfiArchiveClose() to get the trailer written. rpmfiSetFX() is not supported for this type of iterator.
fd | file |
files | file info |