2014-11-15 16:33:24 +01:00
|
|
|
#pragma once
|
|
|
|
#ifndef CRYFS_LIB_CRYFILE_H_
|
|
|
|
#define CRYFS_LIB_CRYFILE_H_
|
|
|
|
|
2014-11-15 23:47:38 +01:00
|
|
|
#include <fusepp/fs_interface/File.h>
|
2014-11-15 16:33:24 +01:00
|
|
|
#include "CryNode.h"
|
|
|
|
|
|
|
|
namespace cryfs {
|
|
|
|
|
2014-11-15 23:47:38 +01:00
|
|
|
class CryFile: public fusepp::File, CryNode {
|
2014-11-15 16:33:24 +01:00
|
|
|
public:
|
|
|
|
CryFile(CryDevice *device, const boost::filesystem::path &path);
|
|
|
|
virtual ~CryFile();
|
|
|
|
|
2014-11-15 23:47:38 +01:00
|
|
|
std::unique_ptr<fusepp::OpenFile> open(int flags) const override;
|
2014-11-15 16:33:24 +01:00
|
|
|
void truncate(off_t size) const override;
|
|
|
|
void unlink() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(CryFile);
|
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace cryfs */
|
|
|
|
|
|
|
|
#endif
|