2014-11-15 16:33:24 +01:00
|
|
|
#pragma once
|
|
|
|
#ifndef CRYFS_LIB_CRYDIR_H_
|
|
|
|
#define CRYFS_LIB_CRYDIR_H_
|
|
|
|
|
2015-02-17 01:02:15 +01:00
|
|
|
#include <messmer/fspp/fs_interface/Dir.h>
|
2014-11-15 16:33:24 +01:00
|
|
|
#include "CryNode.h"
|
2015-02-27 00:51:51 +01:00
|
|
|
#include "impl/DirBlob.h"
|
2014-11-15 16:33:24 +01:00
|
|
|
|
|
|
|
namespace cryfs {
|
|
|
|
|
2014-11-16 00:05:28 +01:00
|
|
|
class CryDir: public fspp::Dir, CryNode {
|
2014-11-15 16:33:24 +01:00
|
|
|
public:
|
2015-02-27 00:51:51 +01:00
|
|
|
CryDir(CryDevice *device, std::unique_ptr<DirBlob> blob);
|
2014-11-15 16:33:24 +01:00
|
|
|
virtual ~CryDir();
|
|
|
|
|
|
|
|
//TODO return type variance to CryFile/CryDir?
|
2014-11-16 00:05:28 +01:00
|
|
|
std::unique_ptr<fspp::File> createFile(const std::string &name, mode_t mode) override;
|
|
|
|
std::unique_ptr<fspp::Dir> createDir(const std::string &name, mode_t mode) override;
|
2014-11-15 16:33:24 +01:00
|
|
|
void rmdir() override;
|
|
|
|
|
|
|
|
std::unique_ptr<std::vector<std::string>> children() const override;
|
|
|
|
|
|
|
|
private:
|
2014-12-07 10:42:16 +01:00
|
|
|
CryDevice *_device;
|
2015-02-27 00:51:51 +01:00
|
|
|
std::unique_ptr<DirBlob> _blob;
|
2014-12-07 10:42:16 +01:00
|
|
|
|
2014-11-15 16:33:24 +01:00
|
|
|
DISALLOW_COPY_AND_ASSIGN(CryDir);
|
|
|
|
};
|
|
|
|
|
2014-12-07 08:57:23 +01:00
|
|
|
}
|
2014-11-15 16:33:24 +01:00
|
|
|
|
|
|
|
#endif
|