◆ DirectoryMetadata()
| AssetMap::DirectoryMetadata::DirectoryMetadata |
( |
const IHasher & |
hasher, |
|
|
ICompress & |
comp, |
|
|
const std::filesystem::directory_entry & |
ent |
|
) |
| |
|
explicit |
Construct an instance of DirectoryMetadata.
The constructor will iterate through the directory passed and compute all necessary data required to archive it. Iteration is recursive and anything that is not a regular file will be ignored.
- Parameters
-
| hasher | Any implementation satisfying IHasher. |
| comp | Any implementation satisfying ICompress. |
| ent | An entry that references a valid, readable directory. |
◆ Buckets()
| decltype(buckets) const& AssetMap::DirectoryMetadata::Buckets |
( |
| ) |
const |
|
noexcept |
Obtain a list of buckets and their entries.
This function provides a vector of vector of directory_entries. The indexable position of an outer vector element is its bucket ID. Every directory entry is guaranteed to be a regular file. Or at least, it was at the time of inspection - if you (or something else) change the on-filesystem data, things may break.
- Returns
vector<vector<fs::directory_entry>>
◆ DataStart()
| ptrdiff_t AssetMap::DirectoryMetadata::DataStart |
( |
| ) |
const |
|
noexcept |
Obtain the offset for the beginning of data entries.
- Returns
- The equivalent of [file start] + [size of all bucket data]
◆ TotalRequiredSpace()
| size_t AssetMap::DirectoryMetadata::TotalRequiredSpace |
( |
| ) |
const |
|
noexcept |
Obtain the worst-case required space to compress the directory passed to the constructor for the given hash and compression algo.
- Returns
- The size required to compress the entire dir contents.
The documentation for this class was generated from the following file: