Simple cache remembering device/inode to detect hardlinks.
More...
#include <PathInfo.h>
|
std::map< dev_t, std::set
< ino_t > > | _devino |
|
Simple cache remembering device/inode to detect hardlinks.
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 |
void PathInfo::devino_cache::clear |
( |
| ) |
|
|
inline |
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.
std::map<dev_t,std::set<ino_t> > PathInfo::devino_cache::_devino |
|
private |
The documentation for this class was generated from the following file: