#ifndef GITFS_BLOB_H #define GITFS_BLOB_H #include #include "git.h" namespace GitFS { using namespace NetFS; class Blob : public File { public: Blob(const GitFS::Git::RepositoryPtr & r, const Git::TreeEntryPtr &); void close(const ::Ice::Current& current) override; Attr fgetattr(ReqEnv env, const ::Ice::Current& current) override; Buffer read(long long int offset, long long int size, const ::Ice::Current& current) override; void ftruncate(ReqEnv env, long long int size, const ::Ice::Current& current) override; void write(long long int offset, long long int size, Buffer data, const ::Ice::Current& current) override; private: Git::BlobPtr blob; const decltype(git_blob_rawsize({})) blobSize; const char * const blobContent; }; } #endif