blob: 1d5ee24e8158888fda241dd806b312f8a19c3b76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#ifndef GITFS_DIRECTORY_H
#define GITFS_DIRECTORY_H
#include "git.h"
#include <directory.h>
#include <git2.h>
#include <string>
#include <types.h>
namespace Ice {
struct Current;
}
namespace GitFS {
using namespace NetFS;
class Repo;
class Directory : public NetFS::Directory {
public:
Directory(Repo * repo, std::string);
void close(const ::Ice::Current & ice) override;
NameList readdir(const ::Ice::Current & ice) override;
DirectoryContents listdir(const ::Ice::Current & ice) override;
private:
Git::TreePtr getSubtree() const;
Repo * const repo;
const std::string path;
mutable Git::TreePtr subTreeCache;
mutable git_oid subTreeCacheRootId;
};
}
#endif
|