libept
|
Access a directory containing Debtags data files. More...
#include <sourcedir.h>
Public Member Functions | |
SourceDir (const std::string &path) | |
~SourceDir () | |
time_t | timestamp () |
Return the time of the newest file in the source directory. More... | |
time_t | vocTimestamp () |
Return the time of the newest vocabulary file in the source directory. More... | |
time_t | tagTimestamp () |
Return the time of the newest tag file in the source directory. More... | |
template<typename OUT > | |
void | readTags (OUT out) |
Read the tag files in the directory and output their content to out. More... | |
void | readVocabularies (Vocabulary &out) |
Read the vocabulary files in the directory and output their content to out. More... | |
Protected Types | |
enum | FileType { SKIP, TAG, VOC, TAGGZ, VOCGZ } |
Protected Member Functions | |
FileType | fileType (const std::string &name) |
Access a directory containing Debtags data files.
|
protected |
ept::debtags::SourceDir::SourceDir | ( | const std::string & | path | ) |
ept::debtags::SourceDir::~SourceDir | ( | ) |
|
protected |
References SKIP, TAG, TAGGZ, VOC, and VOCGZ.
Referenced by readVocabularies(), tagTimestamp(), timestamp(), and vocTimestamp().
void ept::debtags::SourceDir::readTags | ( | OUT | out | ) |
Read the tag files in the directory and output their content to out.
Referenced by ept::debtags::Debtags::changes(), and ept::debtags::Debtags::Debtags().
void ept::debtags::SourceDir::readVocabularies | ( | Vocabulary & | out | ) |
Read the vocabulary files in the directory and output their content to out.
References fileType(), ept::debtags::Vocabulary::read(), VOC, and VOCGZ.
Referenced by ept::debtags::Vocabulary::Vocabulary().
time_t ept::debtags::SourceDir::tagTimestamp | ( | ) |
Return the time of the newest tag file in the source directory.
References fileType(), TAG, TAGGZ, and ept::debtags::Path::timestamp().
Referenced by ept::debtags::Debtags::Debtags().
time_t ept::debtags::SourceDir::timestamp | ( | ) |
Return the time of the newest file in the source directory.
References fileType(), SKIP, and ept::debtags::Path::timestamp().
time_t ept::debtags::SourceDir::vocTimestamp | ( | ) |
Return the time of the newest vocabulary file in the source directory.
References fileType(), ept::debtags::Path::timestamp(), VOC, and VOCGZ.
Referenced by ept::debtags::Vocabulary::Vocabulary(), and ept::debtags::Vocabulary::write().