From a705e8ce0a8aaf3afe885892834468e95c197a16 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 2 Sep 2016 14:24:34 -0400 Subject: Factor a general remote FS accessor out of BinaryCacheStore --- src/libstore/remote-fs-accessor.hh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/libstore/remote-fs-accessor.hh (limited to 'src/libstore/remote-fs-accessor.hh') diff --git a/src/libstore/remote-fs-accessor.hh b/src/libstore/remote-fs-accessor.hh new file mode 100644 index 0000000000..28f36c8296 --- /dev/null +++ b/src/libstore/remote-fs-accessor.hh @@ -0,0 +1,29 @@ +#pragma once + +#include "fs-accessor.hh" +#include "ref.hh" +#include "store-api.hh" + +namespace nix { + +class RemoteFSAccessor : public FSAccessor +{ + ref store; + + std::map> nars; + + std::pair, Path> fetch(const Path & path_); +public: + + RemoteFSAccessor(ref store); + + Stat stat(const Path & path) override; + + StringSet readDirectory(const Path & path) override; + + std::string readFile(const Path & path) override; + + std::string readLink(const Path & path) override; +}; + +} -- cgit 1.4.1