diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2016-11-09T17·57+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2016-11-09T17·57+0100 |
commit | 4b8f1b0ec066a5b994747b1afd050f5f62d857f6 (patch) | |
tree | a946094a9e4a3a56cfe713b01cd7d27104d56b03 /src/libstore/remote-fs-accessor.hh | |
parent | 21c55ab3b54fc2db30ca53c572d24b38331f508c (diff) | |
parent | b99c6e0e2959e90ddda14d8b318e4c7b1a508674 (diff) |
Merge branch 'ssh-store' of https://github.com/shlevy/nix
Diffstat (limited to 'src/libstore/remote-fs-accessor.hh')
-rw-r--r-- | src/libstore/remote-fs-accessor.hh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/libstore/remote-fs-accessor.hh b/src/libstore/remote-fs-accessor.hh new file mode 100644 index 000000000000..28f36c8296e1 --- /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> store; + + std::map<Path, ref<FSAccessor>> nars; + + std::pair<ref<FSAccessor>, Path> fetch(const Path & path_); +public: + + RemoteFSAccessor(ref<Store> 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; +}; + +} |