summaryrefslogtreecommitdiff
path: root/src/dir.h
blob: 7174976b33031ae985b57ad634da10feed640e92 (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
#ifndef GITFS_DIRECTORY_H
#define GITFS_DIRECTORY_H

#include <directory.h>
#include "git.h"

namespace GitFS {
	using namespace NetFS;
	class Repo;
	class Directory : public DirectoryV2 {
		public:
			Directory(const Repo * r, const std::string &);

			void close(const ::Ice::Current& current) override;
			NameList readdir(const ::Ice::Current& current) override;
			DirectoryContents listdir(const ::Ice::Current& current) override;

		private:
			Git::TreePtr getSubtree() const;
			const Repo * repo;
			const std::string path;

			mutable Git::TreePtr subTreeCache;
			mutable git_oid subTreeCacheRootId;
	};
}

#endif