#ifndef GITFS_BLOB_H #define GITFS_BLOB_H #include "git.h" #include #include #include #include #include namespace Ice { struct Current; } namespace GitFS { using namespace NetFS; class Repo; class Blob : public File { public: Blob(const Repo * repo, const std::string &); void close(const ::Ice::Current & ice) override; Attr fgetattr(const ::Ice::Current & ice) override; Buffer read(long long int offset, long long int size, const ::Ice::Current & ice) override; void ftruncate(long long int size, const ::Ice::Current & ice) override; void write(long long int offset, long long int size, std::pair data, const ::Ice::Current & ice) override; long long int copyrange( FilePrxPtr, long long int, long long int, long long int, int, const Ice::Current &) override; private: [[nodiscard]] Git::BlobPtr getBlob() const; const Repo * const repo; Git::TreeEntryPtr entry; Git::BlobPtr blob; std::span blobContent; }; } #endif