ui-utilcpp  1.8.3
Public Member Functions
UI::Util::FQuotaInfo Class Reference

Variant of QuotaInfo from any file in FS. More...

#include <QuotaInfo.hpp>

Inheritance diagram for UI::Util::FQuotaInfo:
Inheritance graph
Collaboration diagram for UI::Util::FQuotaInfo:
Collaboration graph

Public Member Functions

 FQuotaInfo (std::string const &fileName, int const id=Sys::geteuid(), Type const type=Usr_)
 
- Public Member Functions inherited from UI::Util::QuotaInfo
 QuotaInfo (FS const &fs, int const id=Sys::geteuid(), Type const type=Usr_, std::string const &strPath="")
 
std::string getMethod () const
 Get method string of utilized method.
 
unsigned long getBlockHL () const
 Hard limit of disk blocks.
 
unsigned long getBlockSL () const
 Soft limit of disk blocks.
 
unsigned long getBlocks () const
 Current block usage.
 
unsigned long getINodeHL () const
 Hard limit of inodes.
 
unsigned long getINodeSL () const
 Soft limit of inodes.
 
unsigned long getINodes () const
 Current inode usage.
 
time_t getBlockTL () const
 Block timer limit.
 
time_t getINodeTL () const
 Inodes timer limit.
 
bool getFree (unsigned long const limit, unsigned long const blocks, unsigned long &free) const
 Helper for getFree* methods.
 
bool getFreeBlocksHL (unsigned long &free) const
 Get free blocks from hard limit. False, if there is no hard limit.
 
bool getFreeBlocksSL (unsigned long &free) const
 Get free blocks from soft limit. False, if there is no soft limit.
 
bool getFreeINodesHL (unsigned long &free) const
 Get free indoes from hard limit. False, if there is no hard limit.
 
bool getFreeInodesSL (unsigned long &free) const
 Get free inodes from soft limit. False, if there is no soft limit.
 

Additional Inherited Members

- Public Types inherited from UI::Util::QuotaInfo
enum  Type { Usr_, Grp_ }
 Type of quota information.
 
- Static Public Member Functions inherited from UI::Util::QuotaInfo
static FS file2fs (std::string const &fName, std::string const &tab="/proc/mounts")
 Get FS information from any file in that fs. More...
 

Detailed Description

Variant of QuotaInfo from any file in FS.

Note
: Constructor potentially is NOT thread-safe:
See also
file2fs.
Note
Usually, you instantiate one FS object when your program initializes, and then use that for all QuotaInfo() calls thereafter. This is just a shortcut that you should not use if you have several calls on the same FS.

Constructor & Destructor Documentation

UI::Util::FQuotaInfo::FQuotaInfo ( std::string const &  fileName,
int const  id = Sys::geteuid(),
Type const  type = Usr_ 
)
inline
Parameters
fileNameAny file names on the FS you want to run quota on.
idID as in quotactl(2), normally a user or group ID.
typeType (user or group) of quota info to retrieve.

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