![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include "nix/util/fun.hh"#include "nix/util/nar-listing.hh"#include <functional>#include <filesystem>Go to the source code of this file.
Classes | |
| struct | nix::NarAccessor |
Typedefs | |
| using | nix::GetNarBytes = fun<void(uint64_t, uint64_t, Sink &)> |
Functions | |
| ref< NarAccessor > | nix::makeNarAccessor (std::string &&nar) |
| ref< NarAccessor > | nix::makeNarAccessor (NarListing listing) |
| GetNarBytes | nix::seekableGetNarBytes (const std::filesystem::path &path) |
| GetNarBytes | nix::seekableGetNarBytes (Descriptor fd) |
| ref< NarAccessor > | nix::makeLazyNarAccessor (NarListing listing, GetNarBytes getNarBytes) |
| using nix::GetNarBytes = fun<void(uint64_t, uint64_t, Sink &)> |
Create a NAR accessor from a NAR listing (in the format produced by listNar()). The callback getNarBytes(offset, length) is used by the readFile() method of the accessor to get the contents of files inside the NAR.
| ref< NarAccessor > nix::makeLazyNarAccessor | ( | NarListing | listing, |
| GetNarBytes | getNarBytes ) |
Creates a NAR accessor from a given listing and a GetNarBytes getter.
| ref< NarAccessor > nix::makeNarAccessor | ( | NarListing | listing | ) |
This NAR accessor doesn't actually access a NAR, and thus cannot read the contents of files. It just conveys the information which is gotten from listing.
| ref< NarAccessor > nix::makeNarAccessor | ( | std::string && | nar | ) |
Return an object that provides access to the contents of a NAR file.
| GetNarBytes nix::seekableGetNarBytes | ( | const std::filesystem::path & | path | ) |
The canonical GetNarBytes function for a seekable Source.