mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2025-08-08 13:49:47 +00:00
Implement hashing task.
Also get rid of the ShorFileRecordData and put the new LeanBase class to use.
This commit is contained in:
parent
c64e572fc8
commit
d2588d3c7e
9 changed files with 247 additions and 52 deletions
|
@ -51,6 +51,24 @@ namespace mchlib {
|
|||
{
|
||||
}
|
||||
|
||||
FileRecordData ( std::string&& parPath, std::size_t parRelPathOffs, std::time_t parATime, std::time_t parMTime, uint16_t parLevel, bool parIsDir, bool parIsSymLink ) :
|
||||
hash {},
|
||||
abs_path(std::move(parPath)),
|
||||
mime_full(),
|
||||
atime(parATime),
|
||||
mtime(parMTime),
|
||||
path(boost::string_ref(abs_path).substr(parRelPathOffs)),
|
||||
mime_type(),
|
||||
mime_charset(),
|
||||
size(0),
|
||||
level(parLevel),
|
||||
is_directory(parIsDir),
|
||||
is_symlink(parIsSymLink),
|
||||
unreadable(false),
|
||||
hash_valid(false)
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(NDEBUG)
|
||||
FileRecordData ( const FileRecordData& ) = delete;
|
||||
#else
|
||||
|
@ -79,16 +97,6 @@ namespace mchlib {
|
|||
bool hash_valid;
|
||||
};
|
||||
|
||||
struct ShortFileRecordData {
|
||||
std::string abs_path;
|
||||
std::string path;
|
||||
std::time_t atime;
|
||||
std::time_t mtime;
|
||||
uint16_t level;
|
||||
bool is_directory;
|
||||
bool is_symlink;
|
||||
};
|
||||
|
||||
struct SetRecordData {
|
||||
boost::string_ref name;
|
||||
char type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue