rpm 4.19.92
The RPM Package Manager
Loading...
Searching...
No Matches
Files | Typedefs | Enumerations | Functions
File Info Set Iterator API.

File Info Set Iterator API. More...

Files

file  rpmfi.h
 

Typedefs

typedef rpmFlags rpmFsmOp
 

Enumerations

enum  rpmFileActionFlags_e { FAF_UNOWNED = (1 << 31) }
 

Functions

rpmfi rpmfiLink (rpmfi fi)
 
rpm_count_t rpmfiFC (rpmfi fi)
 
int rpmfiFX (rpmfi fi)
 
int rpmfiSetFX (rpmfi fi, int fx)
 
rpm_count_t rpmfiDC (rpmfi fi)
 
int rpmfiDX (rpmfi fi)
 
const char * rpmfiBN (rpmfi fi)
 
const char * rpmfiDN (rpmfi fi)
 
const char * rpmfiFN (rpmfi fi)
 
int rpmfiFindFN (rpmfi fi, const char *fn)
 
const char * rpmfiOBN (rpmfi fi)
 
const char * rpmfiODN (rpmfi fi)
 
const char * rpmfiOFN (rpmfi fi)
 
int rpmfiFindOFN (rpmfi fi, const char *fn)
 
rpmfileAttrs rpmfiFFlags (rpmfi fi)
 
rpmVerifyAttrs rpmfiVFlags (rpmfi fi)
 
rpm_mode_t rpmfiFMode (rpmfi fi)
 
rpmfileState rpmfiFState (rpmfi fi)
 
int rpmfiDigestAlgo (rpmfi fi)
 
const unsigned char * rpmfiFDigest (rpmfi fi, int *algo, size_t *diglen)
 
char * rpmfiFDigestHex (rpmfi fi, int *algo)
 
const unsigned char * rpmfiFSignature (rpmfi fi, size_t *siglen)
 
const unsigned char * rpmfiVSignature (rpmfi fi, size_t *siglen, uint16_t *algo)
 
const char * rpmfiFLink (rpmfi fi)
 
rpm_loff_t rpmfiFSize (rpmfi fi)
 
rpm_rdev_t rpmfiFRdev (rpmfi fi)
 
rpm_ino_t rpmfiFInode (rpmfi fi)
 
rpm_color_t rpmfiColor (rpmfi fi)
 
rpm_color_t rpmfiFColor (rpmfi fi)
 
const char * rpmfiFClass (rpmfi fi)
 
uint32_t rpmfiFDepends (rpmfi fi, const uint32_t **fddictp)
 
uint32_t rpmfiFNlink (rpmfi fi)
 
uint32_t rpmfiFLinks (rpmfi fi, const int **files)
 
rpm_time_t rpmfiFMtime (rpmfi fi)
 
const char * rpmfiFUser (rpmfi fi)
 
const char * rpmfiFGroup (rpmfi fi)
 
const char * rpmfiFCaps (rpmfi fi)
 
const char * rpmfiFLangs (rpmfi fi)
 
int rpmfiStat (rpmfi fi, int flags, struct stat *sb)
 
int rpmfiNext (rpmfi fi)
 
rpmfi rpmfiInit (rpmfi fi, int fx)
 
rpmfi rpmfiFree (rpmfi fi)
 
rpmfi rpmfiNewPool (rpmstrPool pool, Header h, rpmTagVal tagN, rpmfiFlags flags)
 
rpmfi rpmfiNew (const rpmts ts, Header h, rpmTagVal tagN, rpmfiFlags flags)
 
rpmFileTypes rpmfiWhatis (rpm_mode_t mode)
 
int rpmfiCompare (const rpmfi afi, const rpmfi bfi)
 
rpmVerifyAttrs rpmfiVerify (rpmfi fi, rpmVerifyAttrs omitMask)
 
int rpmfilesStat (rpmfiles fi, int ix, int flags, struct stat *sb)
 

Detailed Description

File Info Set Iterator API.

Typedef Documentation

◆ rpmFsmOp

typedef rpmFlags rpmFsmOp

File action and associated flags on install/erase

Enumeration Type Documentation

◆ rpmFileActionFlags_e

File disposition flags during package install/erase transaction. XXX: Move these to rpmfi.h once things stabilize.

Function Documentation

◆ rpmfiBN()

const char * rpmfiBN ( rpmfi  fi)

Return current base name from file info set iterator.

Parameters
fifile info set iterator
Returns
current base name, NULL on invalid

◆ rpmfiColor()

rpm_color_t rpmfiColor ( rpmfi  fi)

Return union of all file color bits from file info set iterator.

Parameters
fifile info set iterator
Returns
current color

◆ rpmfiCompare()

int rpmfiCompare ( const rpmfi  afi,
const rpmfi  bfi 
)

Return file info comparison.

Parameters
afi1st file info
bfi2nd file info
Returns
0 if identical

◆ rpmfiDC()

rpm_count_t rpmfiDC ( rpmfi  fi)

Return directory count from file info set iterator.

Parameters
fifile info set iterator
Returns
current directory count

◆ rpmfiDigestAlgo()

int rpmfiDigestAlgo ( rpmfi  fi)

Return digest algorithm of a file info set iterator.

Parameters
fifile info set iterator
Returns
digest algorithm of file info set iterator, 0 on invalid

◆ rpmfiDN()

const char * rpmfiDN ( rpmfi  fi)

Return current directory name from file info set iterator.

Parameters
fifile info set iterator
Returns
current directory, NULL on invalid

◆ rpmfiDX()

int rpmfiDX ( rpmfi  fi)

Return current directory index from file info set iterator.

Parameters
fifile info set iterator
Returns
current directory index

◆ rpmfiFC()

rpm_count_t rpmfiFC ( rpmfi  fi)

Return file count from file info set iterator.

Parameters
fifile info set iterator
Returns
current file count

◆ rpmfiFCaps()

const char * rpmfiFCaps ( rpmfi  fi)

Return textual representation of current file capabilities from file info set iterator. See cap_from_text(3) for details.

Parameters
fifile info set iterator
Returns
file capability description, "" for no capabilities and NULL on invalid

◆ rpmfiFClass()

const char * rpmfiFClass ( rpmfi  fi)

Return current file class from file info set iterator.

Parameters
fifile info set iterator
Returns
current file class, 0 on invalid

◆ rpmfiFColor()

rpm_color_t rpmfiFColor ( rpmfi  fi)

Return current file color bits from file info set iterator.

Parameters
fifile info set iterator
Returns
current file color

◆ rpmfiFDepends()

uint32_t rpmfiFDepends ( rpmfi  fi,
const uint32_t **  fddictp 
)

Return current file depends dictionary from file info set iterator.

Parameters
fifile info set iterator
[out]*fddictpfile depends dictionary array (or NULL)
Returns
no. of file depends entries, 0 on invalid

◆ rpmfiFDigest()

const unsigned char * rpmfiFDigest ( rpmfi  fi,
int *  algo,
size_t *  diglen 
)

Return current file (binary) digest of file info set iterator.

Parameters
fifile info set iterator
[out]algodigest hash algorithm used (pass NULL to ignore)
[out]diglendigest hash length (pass NULL to ignore)
Returns
current file digest, NULL on invalid

◆ rpmfiFDigestHex()

char * rpmfiFDigestHex ( rpmfi  fi,
int *  algo 
)

Return current file (hex) digest of file info set iterator. The file info set iterator stores file digests in binary format to conserve memory, this converts the binary data back to hex presentation used in headers.

Parameters
fifile info set iterator
[out]algodigest hash algorithm used (pass NULL to ignore)
Returns
current file digest (malloc'ed), NULL on invalid

◆ rpmfiFFlags()

rpmfileAttrs rpmfiFFlags ( rpmfi  fi)

Return current file flags from file info set iterator.

Parameters
fifile info set iterator
Returns
current file flags, 0 on invalid

◆ rpmfiFGroup()

const char * rpmfiFGroup ( rpmfi  fi)

Return current file group from file info set iterator.

Parameters
fifile info set iterator
Returns
current file group, NULL on invalid

◆ rpmfiFindFN()

int rpmfiFindFN ( rpmfi  fi,
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 "."

Parameters
fifile info set iterator
fnfile name
Returns
file index or -1

◆ rpmfiFindOFN()

int rpmfiFindOFN ( rpmfi  fi,
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 "."

Parameters
fifile info set iterator
fnfile name
Returns
file index or -1

◆ rpmfiFInode()

rpm_ino_t rpmfiFInode ( rpmfi  fi)

Return current file inode from file info set iterator.

Parameters
fifile info set iterator
Returns
current file inode, 0 on invalid

◆ rpmfiFLangs()

const char * rpmfiFLangs ( rpmfi  fi)

Return current file language(s) from file info set iterator.

Parameters
fifile info set iterator
Returns
current file language(s), NULL on invalid

◆ rpmfiFLink()

const char * rpmfiFLink ( rpmfi  fi)

Return current file linkto (i.e. symlink(2) target) from file info set iterator.

Parameters
fifile info set iterator
Returns
current file linkto, NULL on invalid

◆ rpmfiFLinks()

uint32_t rpmfiFLinks ( rpmfi  fi,
const int **  files 
)

Return (calculated) current file nlink count from file info set iterator.

Parameters
fifile info set iterator
filesreturns array of file ids hardlinked including ix, NULL for nlink count == 1
Returns
current file nlink count, 0 on invalid

◆ rpmfiFMode()

rpm_mode_t rpmfiFMode ( rpmfi  fi)

Return current file mode from file info set iterator.

Parameters
fifile info set iterator
Returns
current file mode, 0 on invalid

◆ rpmfiFMtime()

rpm_time_t rpmfiFMtime ( rpmfi  fi)

Return current file modify time from file info set iterator.

Parameters
fifile info set iterator
Returns
current file modify time, 0 on invalid

◆ rpmfiFN()

const char * rpmfiFN ( rpmfi  fi)

Return current file name from file info set iterator. NOTE: the returned pointer is only valid until the next rpmfiFN() call!

Parameters
fifile info set iterator
Returns
current file name

◆ rpmfiFNlink()

uint32_t rpmfiFNlink ( rpmfi  fi)

Return (calculated) current file nlink count from file info set iterator.

Parameters
fifile info set iterator
Returns
current file nlink count, 0 on invalid

◆ rpmfiFRdev()

rpm_rdev_t rpmfiFRdev ( rpmfi  fi)

Return current file rdev from file info set iterator.

Parameters
fifile info set iterator
Returns
current file rdev, 0 on invalid

◆ rpmfiFree()

rpmfi rpmfiFree ( rpmfi  fi)

Destroy a file info set iterator.

Parameters
fifile info set iterator
Returns
NULL always

◆ rpmfiFSignature()

const unsigned char * rpmfiFSignature ( rpmfi  fi,
size_t *  siglen 
)

Return current file (binary) signature of file info set iterator.

Parameters
fifile info set iterator
[out]siglensignature length (pass NULL to ignore)
Returns
current file signature, NULL on invalid

◆ rpmfiFSize()

rpm_loff_t rpmfiFSize ( rpmfi  fi)

Return current file size from file info set iterator.

Parameters
fifile info set iterator
Returns
current file size, 0 on invalid

◆ rpmfiFState()

rpmfileState rpmfiFState ( rpmfi  fi)

Return current file state from file info set iterator.

Parameters
fifile info set iterator
Returns
current file state, 0 on invalid

◆ rpmfiFUser()

const char * rpmfiFUser ( rpmfi  fi)

Return current file owner from file info set iterator.

Parameters
fifile info set iterator
Returns
current file owner, NULL on invalid

◆ rpmfiFX()

int rpmfiFX ( rpmfi  fi)

Return current file index from file info set iterator.

Parameters
fifile info set iterator
Returns
current file index

◆ rpmfiInit()

rpmfi rpmfiInit ( rpmfi  fi,
int  fx 
)

Initialize file iterator index.

Parameters
fifile info set iterator
fxfile iterator index
Returns
file info set iterator

◆ rpmfilesStat()

int rpmfilesStat ( rpmfiles  fi,
int  ix,
int  flags,
struct stat *  sb 
)

Map file stat(2) info.

Parameters
fifile info set
ixfile index
flagsflags
[out]sbmapped stat(2) data
Returns
0 on success

◆ rpmfiLink()

rpmfi rpmfiLink ( rpmfi  fi)

Reference a file info set iterator instance.

Parameters
fifile info set iterator
Returns
new file info set iterator reference

◆ rpmfiNew()

rpmfi rpmfiNew ( const rpmts  ts,
Header  h,
rpmTagVal  tagN,
rpmfiFlags  flags 
)

Create and load a file info set iterator.

Parameters
tsunused
hheader
tagNunused
flagsFlags to control what information is loaded.
Returns
new file info set iterator

◆ rpmfiNewPool()

rpmfi rpmfiNewPool ( rpmstrPool  pool,
Header  h,
rpmTagVal  tagN,
rpmfiFlags  flags 
)

Create and load a file info set iterator.

Parameters
poolshared string pool (or NULL for private pool)
hheader
tagNunused
flagsFlags to control what information is loaded.
Returns
new file info set iterator

◆ rpmfiNext()

int rpmfiNext ( rpmfi  fi)

Return next file iterator index.

Parameters
fifile info set iterator
Returns
file iterator index, -1 on termination

◆ rpmfiOBN()

const char * rpmfiOBN ( rpmfi  fi)

Return current original base name from file info set iterator.

Parameters
fifile info set iterator
Returns
current base name, NULL on invalid

◆ rpmfiODN()

const char * rpmfiODN ( rpmfi  fi)

Return current original directory name from file info set iterator.

Parameters
fifile info set iterator
Returns
current directory, NULL on invalid

◆ rpmfiOFN()

const char * rpmfiOFN ( rpmfi  fi)

Return current original file name from file info set iterator. NOTE: the returned pointer is only valid until the next rpmfiOFN() call!

Parameters
fifile info set iterator
Returns
current file name

◆ rpmfiSetFX()

int rpmfiSetFX ( rpmfi  fi,
int  fx 
)

Set current file index in file info set iterator.

Parameters
fifile info set iterator
fxnew file index
Returns
new file index, -1 on error

◆ rpmfiStat()

int rpmfiStat ( rpmfi  fi,
int  flags,
struct stat *  sb 
)

Map file stat(2) info.

Parameters
fifile info iterator
flagsflags
[out]sbmapped stat(2) data

◆ rpmfiVerify()

rpmVerifyAttrs rpmfiVerify ( rpmfi  fi,
rpmVerifyAttrs  omitMask 
)

Verify file attributes (including digest).

Parameters
fifile info iterator
omitMaskbit(s) to disable verify checks
Returns
bit(s) to indicate failure (ie 0 for passed verify)

◆ rpmfiVFlags()

rpmVerifyAttrs rpmfiVFlags ( rpmfi  fi)

Return current file verify flags from file info set iterator.

Parameters
fifile info set iterator
Returns
current file verify flags, 0 on invalid

◆ rpmfiVSignature()

const unsigned char * rpmfiVSignature ( rpmfi  fi,
size_t *  siglen,
uint16_t *  algo 
)

Return current verity (binary) signature of file info set iterator.

Parameters
fifile info set iterator
[out]siglensignature length (pass NULL to ignore)
[out]algofsverity algorithm
Returns
current verity signature, NULL on invalid

◆ rpmfiWhatis()

rpmFileTypes rpmfiWhatis ( rpm_mode_t  mode)

Return file type from mode_t.

Parameters
modefile mode bits (from header)
Returns
file type