HashChainFileStorage

\class HashChainFileStorage Implementation of hash chain storage, based on file system

Constructors

this
this(string folder_path, HashNet net)
Undocumented in source.

Members

Functions

find
Block find(bool delegate(Block) @(safe) predicate)

Finds block that satisfies given predicate @param predicate - predicate for block \return block if search was successfull, null - if such block doesn't exist

getHashes
Fingerprint[] getHashes()

Collects all block filenames in chain folder \return array of block filenames in this folder

read
Block read(Fingerprint fingerprint)

Reads file with given fingerprint and creates block from read data @param fingerprint - fingerprint of block to read \return chain block, or null if such block file doesn't exist

write
void write(const(Block) block)

Writes given block to file @param block - block to write

Variables

folder_path
string folder_path;

Path to local folder where chain files are stored

net
HashNet net;

Hash net

Meta