![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <merkle-tar-adapter.hh>
Public Member Functions | |
| virtual std::unique_ptr< DirectorySinkWithFinalize > | makeDirectorySink ()=0 |
| virtual std::unique_ptr< RegularFileSinkWithFinalize > | makeRegularFileSink ()=0 |
| virtual merkle::TreeEntry | makeSymlink (const std::string &target)=0 |
| virtual void | flush ()=0 |
Interface for creating merkle file system object sinks.
By returning sinks rather than taking callbacks, we allow starting and finishing sink-based creation in an asynchronous manner. This is crucial to being able to adapt messy providers of file system object data (like tarballs) to this interface.
A directory can only refer to objects that are already written, so every sink for a directory's children must be finalized before it is created. Implementations are responsible for whatever that ordering requires of them — see nix::merkle::FileSinkBuilder::makeDirectorySink.
|
pure virtual |
Finish any writes that are still in progress.
Until this is called, objects written through this builder are not necessarily available to anything else that reads the same store.
Implemented in nix::GitRepoPoolImpl.
|
pure virtual |
Create a sink for one directory.
Every sink handed out before this call must have been finalized: an implementation is free to assume that, and to do whatever work making earlier objects referenceable requires.
Implemented in nix::GitRepoPoolImpl.