libzypp 17.37.17
zypp::DiskUsageCounter::MountPoint Class Reference

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...

#include <zypp/DiskUsageCounter.h>

Public Types

enum  Hint { NoHint = 0 , Hint_readonly = (1<<0) , Hint_growonly = (1<<1) }
 HinFlags for ctor. More...

Public Member Functions

 ZYPP_DECLARE_FLAGS (HintFlags, Hint)
 MountPoint (std::string d="/", std::string f=std::string(), long long bs=0LL, long long total=0LL, long long used=0LL, long long pkg=0LL, HintFlags hints=NoHint)
 Ctor initialize directory, fstype and sizes.
 MountPoint (const char *d, const std::string &f=std::string(), long long bs=0LL, long long total=0LL, long long used=0LL, long long pkg=0LL, HintFlags hints=NoHint)
 MountPoint (const std::string &d, long long bs, long long total=0LL, long long used=0LL, long long pkg=0LL, HintFlags hints=NoHint)
 Ctor initialize directory and sizes.
 MountPoint (const char *d, long long bs, long long total=0LL, long long used=0LL, long long pkg=0LL, HintFlags hints=NoHint)
 MountPoint (const std::string &d, HintFlags hints)
 Ctor just name and hints, all sizes 0.
 MountPoint (const char *d, HintFlags hints)
 MountPoint (const std::string &d, Hint hint)
 MountPoint (const char *d, Hint hint)
bool operator< (const MountPoint &rhs) const
 Sort by directory name.
ByteCount blockSize () const
 Block size of the filesystem as ByteCount for convenience.
ByteCount totalSize () const
 Total size of the filesystem as ByteCount for convenience.
ByteCount usedSize () const
 Used size of the filesystem as ByteCount for convenience.
ByteCount freeSize () const
 Free size of the filesystem as ByteCount for convenience.
ByteCount usedAfterCommit () const
 Used size after installation as ByteCount for convenience.
ByteCount freeAfterCommit () const
 Free size after installation as ByteCount for convenience.
ByteCount commitDiff () const
 Size change due to installation as ByteCount for convenience.

Public Attributes

std::string dir
 Directory name.
std::string fstype
 Filesystem type (provided by detectMountPoints)
long long block_size
 Block size of the filesystem in B (0 if you don't care)
long long total_size
 Total size of the filesystem in KiB (0 if you don't care)
long long used_size
 Used size of the filesystem in KiB (0 if you don't care)
long long pkg_size
 Used size after installation in KiB (computed by DiskUsageCoutner)
bool readonly:1
 hint for readonly partitions
bool growonly:1
 hint for growonly partitions (e.g. snapshotting btrfs)

Friends

std::ostream & operator<< (std::ostream &str, const MountPoint &obj)

(Note that these are not member symbols.)

std::ostream & operator<< (std::ostream &str, const DiskUsageCounter::MountPoint &obj) ZYPP_API
 Stream output.

Detailed Description

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.

Definition at line 43 of file DiskUsageCounter.h.

Member Enumeration Documentation

◆ Hint

HinFlags for ctor.

Enumerator
NoHint 
Hint_readonly 

readonly partitions

Hint_growonly 

growonly partitions (e.g. snapshotting btrfs)

Definition at line 58 of file DiskUsageCounter.h.

Constructor & Destructor Documentation

◆ MountPoint() [1/8]

zypp::DiskUsageCounter::MountPoint::MountPoint ( std::string d = "/",
std::string f = std::string(),
long long bs = 0LL,
long long total = 0LL,
long long used = 0LL,
long long pkg = 0LL,
HintFlags hints = NoHint )
inline

Ctor initialize directory, fstype and sizes.

Definition at line 67 of file DiskUsageCounter.h.

◆ MountPoint() [2/8]

zypp::DiskUsageCounter::MountPoint::MountPoint ( const char * d,
const std::string & f = std::string(),
long long bs = 0LL,
long long total = 0LL,
long long used = 0LL,
long long pkg = 0LL,
HintFlags hints = NoHint )
inline

Definition at line 81 of file DiskUsageCounter.h.

◆ MountPoint() [3/8]

zypp::DiskUsageCounter::MountPoint::MountPoint ( const std::string & d,
long long bs,
long long total = 0LL,
long long used = 0LL,
long long pkg = 0LL,
HintFlags hints = NoHint )
inline

Ctor initialize directory and sizes.

Definition at line 90 of file DiskUsageCounter.h.

◆ MountPoint() [4/8]

zypp::DiskUsageCounter::MountPoint::MountPoint ( const char * d,
long long bs,
long long total = 0LL,
long long used = 0LL,
long long pkg = 0LL,
HintFlags hints = NoHint )
inline

Definition at line 96 of file DiskUsageCounter.h.

◆ MountPoint() [5/8]

zypp::DiskUsageCounter::MountPoint::MountPoint ( const std::string & d,
HintFlags hints )
inline

Ctor just name and hints, all sizes 0.

Definition at line 104 of file DiskUsageCounter.h.

◆ MountPoint() [6/8]

zypp::DiskUsageCounter::MountPoint::MountPoint ( const char * d,
HintFlags hints )
inline

Definition at line 108 of file DiskUsageCounter.h.

◆ MountPoint() [7/8]

zypp::DiskUsageCounter::MountPoint::MountPoint ( const std::string & d,
Hint hint )
inline

Definition at line 112 of file DiskUsageCounter.h.

◆ MountPoint() [8/8]

zypp::DiskUsageCounter::MountPoint::MountPoint ( const char * d,
Hint hint )
inline

Definition at line 116 of file DiskUsageCounter.h.

Member Function Documentation

◆ ZYPP_DECLARE_FLAGS()

zypp::DiskUsageCounter::MountPoint::ZYPP_DECLARE_FLAGS ( HintFlags ,
Hint  )

◆ operator<()

bool zypp::DiskUsageCounter::MountPoint::operator< ( const MountPoint & rhs) const
inline

Sort by directory name.

Definition at line 121 of file DiskUsageCounter.h.

◆ blockSize()

ByteCount zypp::DiskUsageCounter::MountPoint::blockSize ( ) const
inline

Block size of the filesystem as ByteCount for convenience.

Definition at line 125 of file DiskUsageCounter.h.

◆ totalSize()

ByteCount zypp::DiskUsageCounter::MountPoint::totalSize ( ) const
inline

Total size of the filesystem as ByteCount for convenience.

Definition at line 129 of file DiskUsageCounter.h.

◆ usedSize()

ByteCount zypp::DiskUsageCounter::MountPoint::usedSize ( ) const
inline

Used size of the filesystem as ByteCount for convenience.

Definition at line 133 of file DiskUsageCounter.h.

◆ freeSize()

ByteCount zypp::DiskUsageCounter::MountPoint::freeSize ( ) const
inline

Free size of the filesystem as ByteCount for convenience.

Definition at line 137 of file DiskUsageCounter.h.

◆ usedAfterCommit()

ByteCount zypp::DiskUsageCounter::MountPoint::usedAfterCommit ( ) const
inline

Used size after installation as ByteCount for convenience.

Definition at line 141 of file DiskUsageCounter.h.

◆ freeAfterCommit()

ByteCount zypp::DiskUsageCounter::MountPoint::freeAfterCommit ( ) const
inline

Free size after installation as ByteCount for convenience.

Definition at line 145 of file DiskUsageCounter.h.

◆ commitDiff()

ByteCount zypp::DiskUsageCounter::MountPoint::commitDiff ( ) const
inline

Size change due to installation as ByteCount for convenience.

Definition at line 149 of file DiskUsageCounter.h.

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream & str,
const MountPoint & obj )
friend

Definition at line 344 of file DiskUsageCounter.cc.

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream & str,
const DiskUsageCounter::MountPoint & obj )
related

Stream output.

Definition at line 344 of file DiskUsageCounter.cc.

Member Data Documentation

◆ dir

std::string zypp::DiskUsageCounter::MountPoint::dir

Directory name.

Definition at line 46 of file DiskUsageCounter.h.

◆ fstype

std::string zypp::DiskUsageCounter::MountPoint::fstype

Filesystem type (provided by detectMountPoints)

Definition at line 47 of file DiskUsageCounter.h.

◆ block_size

long long zypp::DiskUsageCounter::MountPoint::block_size

Block size of the filesystem in B (0 if you don't care)

Definition at line 48 of file DiskUsageCounter.h.

◆ total_size

long long zypp::DiskUsageCounter::MountPoint::total_size

Total size of the filesystem in KiB (0 if you don't care)

Definition at line 49 of file DiskUsageCounter.h.

◆ used_size

long long zypp::DiskUsageCounter::MountPoint::used_size

Used size of the filesystem in KiB (0 if you don't care)

Definition at line 50 of file DiskUsageCounter.h.

◆ pkg_size

long long zypp::DiskUsageCounter::MountPoint::pkg_size
mutable

Used size after installation in KiB (computed by DiskUsageCoutner)

Definition at line 51 of file DiskUsageCounter.h.

◆ readonly

bool zypp::DiskUsageCounter::MountPoint::readonly

hint for readonly partitions

Definition at line 53 of file DiskUsageCounter.h.

◆ growonly

bool zypp::DiskUsageCounter::MountPoint::growonly

hint for growonly partitions (e.g. snapshotting btrfs)

Definition at line 54 of file DiskUsageCounter.h.


The documentation for this class was generated from the following file: