libzypp 17.31.23
|
Compute disk space occupied by packages across partitions/directories. More...
#include <DiskUsageCounter.h>
Classes | |
class | MountPoint |
Mount point description If block_size is set DiskUsageCoutner will assume half a block_size is wasted per file, in case a package provides detailed isk usage information. More... | |
Public Types | |
typedef std::set< MountPoint > | MountPointSet |
Public Member Functions | |
DiskUsageCounter () | |
DiskUsageCounter (const MountPointSet &mps_r) | |
Ctor taking the MountPointSet to compute. | |
void | setMountPoints (const MountPointSet &mps_r) |
Set a MountPointSet to compute. | |
const MountPointSet & | getMountPoints () const |
Get the current MountPointSet. | |
MountPointSet | disk_usage (const ResPool &pool) const |
Compute disk usage if the current transaction woud be commited. | |
MountPointSet | disk_usage (sat::Solvable solv_r) const |
Compute disk usage of a single Solvable. | |
MountPointSet | disk_usage (const PoolItem &pi_r) const |
MountPointSet | disk_usage (const ResObject::constPtr &obj_r) const |
MountPointSet | disk_usage (const Bitmap &bitmap_r) const |
Compute disk usage of a collection defined by a solvable bitmap. | |
template<class Iterator > | |
MountPointSet | disk_usage (Iterator begin_r, Iterator end_r) const |
Compute disk usage of a collection (convertible by asSolvable). | |
Static Public Member Functions | |
static MountPointSet | detectMountPoints (const std::string &rootdir="/") |
Get mountpoints of system below rootdir If we happen to detect snapshotting btrfs partitions, the MountPoint::growonly hint is set. | |
static MountPointSet | justRootPartition () |
Only one entry for "/" to collect total sizes. | |
Private Attributes | |
MountPointSet | _mps |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const DiskUsageCounter &obj) |
Stream output. | |
Compute disk space occupied by packages across partitions/directories.
Definition at line 31 of file DiskUsageCounter.h.
typedef std::set<MountPoint> zypp::DiskUsageCounter::MountPointSet |
Definition at line 153 of file DiskUsageCounter.h.
|
inline |
Definition at line 155 of file DiskUsageCounter.h.
|
inline |
Ctor taking the MountPointSet to compute.
Definition at line 159 of file DiskUsageCounter.h.
|
inline |
Set a MountPointSet to compute.
Definition at line 164 of file DiskUsageCounter.h.
|
inline |
Get the current MountPointSet.
Definition at line 168 of file DiskUsageCounter.h.
|
static |
Get mountpoints of system below rootdir If we happen to detect snapshotting btrfs partitions, the MountPoint::growonly hint is set.
Disk usage computation will assume that deleted packages will not free any space (kept in a snapshot).
Definition at line 129 of file DiskUsageCounter.cc.
|
static |
Only one entry for "/" to collect total sizes.
Definition at line 337 of file DiskUsageCounter.cc.
DiskUsageCounter::MountPointSet zypp::DiskUsageCounter::disk_usage | ( | const ResPool & | pool | ) | const |
Compute disk usage if the current transaction woud be commited.
Definition at line 92 of file DiskUsageCounter.cc.
DiskUsageCounter::MountPointSet zypp::DiskUsageCounter::disk_usage | ( | sat::Solvable | solv_r | ) | const |
Compute disk usage of a single Solvable.
Definition at line 108 of file DiskUsageCounter.cc.
|
inline |
Definition at line 188 of file DiskUsageCounter.h.
|
inline |
Definition at line 191 of file DiskUsageCounter.h.
DiskUsageCounter::MountPointSet zypp::DiskUsageCounter::disk_usage | ( | const Bitmap & | bitmap_r | ) | const |
Compute disk usage of a collection defined by a solvable bitmap.
Definition at line 120 of file DiskUsageCounter.cc.
|
inline |
Compute disk usage of a collection (convertible by asSolvable).
Definition at line 199 of file DiskUsageCounter.h.
|
related |
Stream output.
Definition at line 221 of file DiskUsageCounter.h.
|
private |
Definition at line 208 of file DiskUsageCounter.h.