libcryfs/impl/FileBlock.h
2015-02-17 01:02:15 +01:00

29 lines
540 B
C++

#pragma once
#ifndef CRYFS_LIB_IMPL_FILEBLOCK_H_
#define CRYFS_LIB_IMPL_FILEBLOCK_H_
#include <messmer/blockstore/interface/Block.h>
#include <memory>
namespace cryfs {
class FileBlock {
public:
FileBlock(std::unique_ptr<blockstore::Block> block);
virtual ~FileBlock();
static bool IsFile(const blockstore::Block &block);
void InitializeEmptyFile();
private:
std::unique_ptr<blockstore::Block> _block;
unsigned char *magicNumber();
static const unsigned char *magicNumber(const blockstore::Block &block);
};
}
#endif