#include <PathInfo.h>
Public Member Functions | |
devino_cache () | |
void | clear () |
bool | insert (const dev_t &dev_r, const ino_t &ino_r) |
Private Attributes | |
std::map< dev_t, std::set < ino_t > > | _devino |
PathInfo::devino_cache trace; for ( all files ) { if ( trace.insert( file.device, file.inode ) ) { // 1st occurance of file } // else: hardlink; already counted this device/inode } }
PathInfo::devino_cache::devino_cache | ( | ) | [inline] |
Constructor
void PathInfo::devino_cache::clear | ( | ) | [inline] |
Clear cache
References _devino.
bool PathInfo::devino_cache::insert | ( | const dev_t & | dev_r, | |
const ino_t & | ino_r | |||
) | [inline] |
Remember dev/ino. Return true
if it's inserted the first time, false
if alredy present in cache (a hardlink to a previously remembered file.
References _devino.
std::map<dev_t,std::set<ino_t> > PathInfo::devino_cache::_devino [private] |