#ifndef CRYFS_FSBLOBSTORE_FSBLOBSTORE_H #define CRYFS_FSBLOBSTORE_FSBLOBSTORE_H #include #include #include #include "FileBlob.h" #include "DirBlob.h" #include "SymlinkBlob.h" namespace cryfs { namespace fsblobstore { //TODO Test classes in fsblobstore class FsBlobStore { public: FsBlobStore(cpputils::unique_ref baseBlobStore); cpputils::unique_ref createFileBlob(); cpputils::unique_ref createDirBlob(); cpputils::unique_ref createSymlinkBlob(const boost::filesystem::path &target); boost::optional> load(const blockstore::Key &key); void remove(cpputils::unique_ref blob); private: std::function freeLockFunction(const blockstore::Key &key); //Instead of locking open blobs, it would be faster to allow parallel access similar to parallelaccessstore. cpputils::LockPool _openBlobs; cpputils::unique_ref _baseBlobStore; }; } } #endif