#include <path.hh>
Public Member Functions | |
StorePath (std::string_view baseName) | |
StorePath (const Hash &hash, std::string_view name) | |
std::string_view | to_string () const noexcept |
bool | operator== (const StorePath &other) const noexcept=default |
auto | operator<=> (const StorePath &other) const noexcept=default |
bool | isDerivation () const noexcept |
void | requireDerivation () const |
std::string_view | name () const |
std::string_view | hashPart () const |
Static Public Member Functions | |
static StorePath | random (std::string_view name) |
Static Public Attributes | |
static constexpr size_t | HashLen = 32 |
static constexpr size_t | MaxPathLen = 211 |
static StorePath | dummy |
Store path is the fundamental reference type of Nix. A store paths refers to a Store object.
See store/store-path.html for more information on a conceptual level.
nix::StorePath::StorePath | ( | std::string_view | baseName | ) |
BadStorePath |
nix::StorePath::StorePath | ( | const Hash & | hash, |
std::string_view | name ) |
BadStorePath |
|
noexcept |
Check whether a file name ends with the extension for derivations.
void nix::StorePath::requireDerivation | ( | ) | const |
Throw an exception if isDerivation
is false.
|
staticconstexpr |
Size of the hash part of store paths, in base-32 characters.