rpm 4.19.92
The RPM Package Manager
|
File Info Set API. More...
Typedefs | |
typedef enum rpmFileTypes_e | rpmFileTypes |
typedef enum rpmFileAction_e | rpmFileAction |
Enumerations | |
enum | rpmFileTypes_e { PIPE = 1 , CDEV = 2 , XDIR = 4 , BDEV = 6 , REG = 8 , LINK = 10 , SOCK = 12 } |
enum | rpmFileAction_e { FA_UNKNOWN = 0 , FA_CREATE = 1 , FA_COPYIN = 2 , FA_COPYOUT = 3 , FA_BACKUP = 4 , FA_SAVE = 5 , FA_SKIP = 6 , FA_ALTNAME = 7 , FA_ERASE = 8 , FA_SKIPNSTATE = 9 , FA_SKIPNETSHARED = 10 , FA_SKIPCOLOR = 11 , FA_TOUCH = 12 } |
Functions | |
rpmfiles | rpmfilesNew (rpmstrPool pool, Header h, rpmTagVal tagN, rpmfiFlags flags) |
rpmfiles | rpmfilesLink (rpmfiles fi) |
rpmfiles | rpmfilesFree (rpmfiles fi) |
rpm_count_t | rpmfilesFC (rpmfiles fi) |
rpm_count_t | rpmfilesDC (rpmfiles fi) |
int | rpmfilesFindFN (rpmfiles files, const char *fn) |
int | rpmfilesFindOFN (rpmfiles files, const char *fn) |
int | rpmfilesDigestAlgo (rpmfiles fi) |
rpm_color_t | rpmfilesColor (rpmfiles files) |
int | rpmfilesCompare (rpmfiles afi, int aix, rpmfiles bfi, int bix) |
const char * | rpmfilesBN (rpmfiles fi, int ix) |
const char * | rpmfilesDN (rpmfiles fi, int jx) |
int | rpmfilesDI (rpmfiles fi, int ix) |
char * | rpmfilesFN (rpmfiles fi, int ix) |
int | rpmfilesODI (rpmfiles fi, int ix) |
const char * | rpmfilesOBN (rpmfiles fi, int ix) |
const char * | rpmfilesODN (rpmfiles fi, int jx) |
char * | rpmfilesOFN (rpmfiles fi, int ix) |
rpmVerifyAttrs | rpmfilesVFlags (rpmfiles fi, int ix) |
rpmfileState | rpmfilesFState (rpmfiles fi, int ix) |
const char * | rpmfilesFLink (rpmfiles fi, int ix) |
rpm_loff_t | rpmfilesFSize (rpmfiles fi, int ix) |
rpm_color_t | rpmfilesFColor (rpmfiles fi, int ix) |
const char * | rpmfilesFClass (rpmfiles fi, int ix) |
uint32_t | rpmfilesFDepends (rpmfiles fi, int ix, const uint32_t **fddictp) |
uint32_t | rpmfilesFNlink (rpmfiles fi, int ix) |
uint32_t | rpmfilesFLinks (rpmfiles fi, int ix, const int **files) |
const char * | rpmfilesFLangs (rpmfiles fi, int ix) |
rpmfileAttrs | rpmfilesFFlags (rpmfiles fi, int ix) |
rpm_mode_t | rpmfilesFMode (rpmfiles fi, int ix) |
const unsigned char * | rpmfilesFDigest (rpmfiles fi, int ix, int *algo, size_t *len) |
const unsigned char * | rpmfilesFSignature (rpmfiles fi, int ix, size_t *len) |
const unsigned char * | rpmfilesVSignature (rpmfiles fi, int ix, size_t *len, uint16_t *algo) |
rpm_rdev_t | rpmfilesFRdev (rpmfiles fi, int ix) |
rpm_ino_t | rpmfilesFInode (rpmfiles fi, int ix) |
rpm_time_t | rpmfilesFMtime (rpmfiles fi, int ix) |
const char * | rpmfilesFUser (rpmfiles fi, int ix) |
const char * | rpmfilesFGroup (rpmfiles fi, int ix) |
const char * | rpmfilesFCaps (rpmfiles fi, int ix) |
rpmVerifyAttrs | rpmfilesVerify (rpmfiles fi, int ix, rpmVerifyAttrs omitMask) |
File Info Set API.
typedef enum rpmFileAction_e rpmFileAction |
File disposition(s) during package install/erase transaction.
typedef enum rpmFileTypes_e rpmFileTypes |
File types. These are the file types used internally by rpm. The file type is determined by applying stat(2) macros like S_ISDIR to the file mode tag from a header. The values are arbitrary, but are identical to the linux stat(2) file types.
enum rpmFileAction_e |
File disposition(s) during package install/erase transaction.
enum rpmFileTypes_e |
File types. These are the file types used internally by rpm. The file type is determined by applying stat(2) macros like S_ISDIR to the file mode tag from a header. The values are arbitrary, but are identical to the linux stat(2) file types.
Enumerator | |
---|---|
PIPE | pipe/fifo |
CDEV | character device |
XDIR | directory |
BDEV | block device |
REG | regular file |
LINK | hard link |
SOCK | socket |
const char * rpmfilesBN | ( | rpmfiles | fi, |
int | ix | ||
) |
Return base name from file info set.
fi | file info set |
ix | file index |
rpm_color_t rpmfilesColor | ( | rpmfiles | files | ) |
Return union of all file color bits from file info set.
files | file info set |
int rpmfilesCompare | ( | rpmfiles | afi, |
int | aix, | ||
rpmfiles | bfi, | ||
int | bix | ||
) |
Return file info comparison.
afi | 1st file info |
aix | index of the 1st file |
bfi | 2nd file info |
bix | index of the 2nd file |
rpm_count_t rpmfilesDC | ( | rpmfiles | fi | ) |
Return directory count from file info set.
fi | file info set |
int rpmfilesDI | ( | rpmfiles | fi, |
int | ix | ||
) |
Return directory index from file info set.
fi | file info set |
ix | file index |
int rpmfilesDigestAlgo | ( | rpmfiles | fi | ) |
Return digest algorithm of a file info set.
fi | file info set |
const char * rpmfilesDN | ( | rpmfiles | fi, |
int | jx | ||
) |
Return directory name from file info set. Note the index is on distinct directories within the file set, not a file index. The directory index associated with a given file index can be retrieved with rpmfilesDI(). Ie to constuct the full path of file index X you'd catenate the results of rpmfilesDN(f, rpmfilesDI(f, X)) and rpmfilesBN(f, X).
fi | file info set |
jx | directory index |
rpm_count_t rpmfilesFC | ( | rpmfiles | fi | ) |
Return file count from file info set.
fi | file info set |
const char * rpmfilesFCaps | ( | rpmfiles | fi, |
int | ix | ||
) |
Return textual representation of file capabilities from file info set. See cap_from_text(3) for details.
fi | file info set |
ix | file index |
const char * rpmfilesFClass | ( | rpmfiles | fi, |
int | ix | ||
) |
Return file class from file info set.
fi | file info set |
ix | file index |
rpm_color_t rpmfilesFColor | ( | rpmfiles | fi, |
int | ix | ||
) |
Return file color bits from file info set.
fi | file info set |
ix | file index |
uint32_t rpmfilesFDepends | ( | rpmfiles | fi, |
int | ix, | ||
const uint32_t ** | fddictp | ||
) |
Return file depends dictionary from file info set.
fi | file info set | |
ix | file index | |
[out] | *fddictp | file depends dictionary array (or NULL) |
const unsigned char * rpmfilesFDigest | ( | rpmfiles | fi, |
int | ix, | ||
int * | algo, | ||
size_t * | len | ||
) |
Return file (binary) digest of file info set.
fi | file info set | |
ix | file index | |
[out] | algo | digest hash algorithm used (pass NULL to ignore) |
[out] | len | digest hash length (pass NULL to ignore) |
rpmfileAttrs rpmfilesFFlags | ( | rpmfiles | fi, |
int | ix | ||
) |
Return file flags from file info set.
fi | file info set |
ix | file index |
const char * rpmfilesFGroup | ( | rpmfiles | fi, |
int | ix | ||
) |
Return file group from file info set.
fi | file info set |
ix | file index |
int rpmfilesFindFN | ( | rpmfiles | files, |
const char * | fn | ||
) |
Return file index of the given file name or -1 if file is not in the rpmfi. The file name may have "." prefixed but is then interpreted as a global path without the prefixing "."
files | file info set |
fn | file name |
int rpmfilesFindOFN | ( | rpmfiles | files, |
const char * | fn | ||
) |
Return file index of the given original file name or -1 if file is not in the rpmfi. The file name may have "." prefixed but is then interpreted as a global path without the prefixing "."
files | file info set |
fn | file name |
rpm_ino_t rpmfilesFInode | ( | rpmfiles | fi, |
int | ix | ||
) |
Return file inode from file info set.
fi | file info set |
ix | file index |
const char * rpmfilesFLangs | ( | rpmfiles | fi, |
int | ix | ||
) |
Return file language(s) from file info set.
fi | file info set |
ix | file index |
const char * rpmfilesFLink | ( | rpmfiles | fi, |
int | ix | ||
) |
Return file linkto (i.e. symlink(2) target) from file info set.
fi | file info set |
ix | file index |
uint32_t rpmfilesFLinks | ( | rpmfiles | fi, |
int | ix, | ||
const int ** | files | ||
) |
Return (calculated) file nlink count from file info set.
fi | file info set |
ix | file index |
files | returns array of file ids hardlinked including ix, NULL for nlink count == 1 |
rpm_mode_t rpmfilesFMode | ( | rpmfiles | fi, |
int | ix | ||
) |
Return file mode from file info set.
fi | file info set |
ix | file index |
rpm_time_t rpmfilesFMtime | ( | rpmfiles | fi, |
int | ix | ||
) |
Return file modify time from file info set.
fi | file info set |
ix | file index |
char * rpmfilesFN | ( | rpmfiles | fi, |
int | ix | ||
) |
Return file name from file info set.
fi | file info set |
ix | file index |
uint32_t rpmfilesFNlink | ( | rpmfiles | fi, |
int | ix | ||
) |
Return (calculated) file nlink count from file info set.
fi | file info set |
ix | file index |
rpm_rdev_t rpmfilesFRdev | ( | rpmfiles | fi, |
int | ix | ||
) |
Return file rdev from file info set.
fi | file info set |
ix | file index |
rpmfiles rpmfilesFree | ( | rpmfiles | fi | ) |
Destroy a file info set.
fi | file info set |
const unsigned char * rpmfilesFSignature | ( | rpmfiles | fi, |
int | ix, | ||
size_t * | len | ||
) |
Return file (binary) digest of file info set.
fi | file info set | |
ix | file index | |
[out] | len | signature length (pass NULL to ignore) |
rpm_loff_t rpmfilesFSize | ( | rpmfiles | fi, |
int | ix | ||
) |
Return file size from file info set.
fi | file info set |
ix | file index |
rpmfileState rpmfilesFState | ( | rpmfiles | fi, |
int | ix | ||
) |
Return file state from file info set.
fi | file info set |
ix | file index |
const char * rpmfilesFUser | ( | rpmfiles | fi, |
int | ix | ||
) |
Return file owner from file info set.
fi | file info set |
ix | file index |
rpmfiles rpmfilesLink | ( | rpmfiles | fi | ) |
Reference a file info set instance.
fi | file info set |
rpmfiles rpmfilesNew | ( | rpmstrPool | pool, |
Header | h, | ||
rpmTagVal | tagN, | ||
rpmfiFlags | flags | ||
) |
Create and load a file info set.
pool | shared string pool (or NULL for private pool) |
h | header |
tagN | unused |
flags | Flags to control what information is loaded. |
const char * rpmfilesOBN | ( | rpmfiles | fi, |
int | ix | ||
) |
Return original base name from file info set.
fi | file info set |
ix | file index |
int rpmfilesODI | ( | rpmfiles | fi, |
int | ix | ||
) |
Return original directory index from file info set.
fi | file info set |
ix | file index |
const char * rpmfilesODN | ( | rpmfiles | fi, |
int | jx | ||
) |
Return original directory name from file info set. Note the index is on distinct directories within the file set, not a file index. The directory index associated with a given file index can be retrieved with rpmfilesODI(). Ie to constuct the full path of file index X you'd catenate the results of rpmfilesODN(f, rpmfilesODI(f, X)) and rpmfilesOBN(f, X).
fi | file info set |
jx | directory index |
char * rpmfilesOFN | ( | rpmfiles | fi, |
int | ix | ||
) |
Return original file name from file info set.
fi | file info set |
ix | file index |
rpmVerifyAttrs rpmfilesVerify | ( | rpmfiles | fi, |
int | ix, | ||
rpmVerifyAttrs | omitMask | ||
) |
Verify file attributes (including digest).
fi | file info set |
ix | file index |
omitMask | bit(s) to disable verify checks |
rpmVerifyAttrs rpmfilesVFlags | ( | rpmfiles | fi, |
int | ix | ||
) |
Return file verify flags from file info set.
fi | file info set |
ix | file index |
const unsigned char * rpmfilesVSignature | ( | rpmfiles | fi, |
int | ix, | ||
size_t * | len, | ||
uint16_t * | algo | ||
) |
Return file verity signature (binary)
fi | file info set | |
ix | file index | |
[out] | len | signature length (pass NULL to ignore) |
[out] | algo | signature algorithm |