ROOT logo
HYDRA - THE HADES ANALYSIS PACKAGE » UTIL » HFileSys

class HFileSys

_HADES_CLASS_DESCRIPTION



 HDiskFile,HDiskDir,HDiskCatalog,HFileSys

 tool set to build a catalog of a full filesystem including all
 meta information of files and dirs. The catalog can be updated
 incremental by rescanning only dirs which have been modfied since
 last scan.


Function Members (Methods)

public:
HFileSys()
HFileSys(const HFileSys&)
~HFileSys()
static voidfillSysInfo()
static voidgetFileSize(ULong64_t size, TString& out)
static Bool_tgetGroup(gid_t gid, TString& name)
static map<gid_t,TString>&getGroupMap()
static voidgetGroups(map<gid_t,TString>& mgroups)
static voidgetModTime(time_t lastmod, TString& modtime)
static ULong64_tgetSmallerLimit()
static ULong64_tgetUnitG()
static ULong64_tgetUnitK()
static ULong64_tgetUnitM()
static ULong64_tgetUnitT()
static Bool_tgetUser(uid_t uid, TString& name)
static map<uid_t,TString>&getUserMap()
static voidgetUsers(map<uid_t,TString>& musers)
static voidlsDirectory(TString directory, vector<TString>& fileList)
static voidlsDirectoryRecursive(TString directory, vector<TString>& fullList)
static voidlsFiles(TString directory, vector<TString>& fileList, Bool_t clear = kTRUE, Bool_t fullpath = kFALSE)
static voidlsFilesRecursive(TString directory, vector<TString>& fullList)
HFileSys&operator=(const HFileSys&)
static voidsetUnit(ULong64_t u)
private:
static map<gid_t,TString>initGroups()
static map<uid_t,TString>initUsers()

Data Members

private:
static ULong64_tSmallerLimit!
static map<gid_t,TString>mgroups
static map<uid_t,TString>musers
static ULong64_tunitG
static ULong64_tunitK
static ULong64_tunitM
static ULong64_tunitT

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

void getUsers(map<uid_t,TString>& musers)
 gather all user known by the system
void getGroups(map<gid_t,TString>& mgroups)
 gather all groups known by the system
map<uid_t,TString> initUsers()
 helper function to init static maps
map<gid_t,TString> initGroups()
 helper function to init static maps
void fillSysInfo()
 gather user and group infos from the
 system
Bool_t getUser(uid_t uid, TString& name)
 lookup of user uid in the map of
 known users. if the user can not be
 found the the user name will be unknown_uid
Bool_t getGroup(gid_t gid, TString& name)
 lookup of group gid in the map of
 known groups. if the group can not be
 found the the group name will be unknown_gid
void getModTime(time_t lastmod, TString& modtime)
 translates time_t lastmod into string
 witrhout trailing \n
void getFileSize(ULong64_t size, TString& out)
 returns human readable file size (K,M,G,T units)
void lsFiles(TString directory, vector<TString>& fileList, Bool_t clear = kTRUE, Bool_t fullpath = kFALSE)
 fill all file names of directory to vector.
 uses readdir()
void lsFilesRecursive(TString directory, vector<TString>& fullList)
 fill all dir names of directory rekursively to vector.
 uses readdir()
void lsDirectory(TString directory, vector<TString>& fileList)
 fill all dir names of directory to vector.
 uses readdir()
void lsDirectoryRecursive(TString directory, vector<TString>& fullList)
 fill all dir names of directory rekursively to vector.
 uses readdir()
ULong64_t getSmallerLimit()
{ return SmallerLimit;}
map<uid_t,TString>& getUserMap()
{ return musers; }
map<gid_t,TString>& getGroupMap()
{ return mgroups; }
void setUnit(ULong64_t u)
{ unitK = u; unitM=u*u; unitG=unitM*u; unitT=unitG*u; }
ULong64_t getUnitK()
{ return unitK;}
ULong64_t getUnitT()
{ return unitT;}
ULong64_t getUnitG()
{ return unitG;}
ULong64_t getUnitM()
{ return unitM;}