![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <store-dir-config.hh>
Public Member Functions | |
| StorePath | parseStorePath (std::string_view path) const |
| StorePath | parseStorePathCanonical (std::string_view path) const |
| std::optional< StorePath > | maybeParseStorePath (std::string_view path) const |
| std::string | printStorePath (const StorePath &path) const |
| StringSet | printStorePathSet (const StorePathSet &path) const |
| std::size_t | maxCanonicalStorePathLen () const noexcept |
| bool | isInStore (std::string_view path) const |
| bool | isStorePath (std::string_view path) const |
| std::pair< StorePath, CanonPath > | toStorePath (std::string_view path) const |
| StorePath | makeStorePath (std::string_view type, std::string_view hash, std::string_view name) const |
| StorePath | makeStorePath (std::string_view type, const Hash &hash, std::string_view name) const |
| StorePath | makeOutputPath (std::string_view id, const Hash &hash, std::string_view name) const |
| StorePath | makeFixedOutputPath (std::string_view name, const FixedOutputInfo &info) const |
| StorePath | makeFixedOutputPathFromCA (std::string_view name, const ContentAddressWithReferences &ca) const |
| std::pair< StorePath, Hash > | computeStorePath (std::string_view name, const SourcePath &path, ContentAddressMethod method=ContentAddressMethod::Raw::NixArchive, HashAlgorithm hashAlgo=HashAlgorithm::SHA256, const StorePathSet &references={}, PathFilter &filter=defaultPathFilter) const |
Public Attributes | |
| const std::string & | storeDir |
| std::pair< StorePath, Hash > nix::StoreDirConfig::computeStorePath | ( | std::string_view | name, |
| const SourcePath & | path, | ||
| ContentAddressMethod | method = ContentAddressMethod::Raw::NixArchive, | ||
| HashAlgorithm | hashAlgo = HashAlgorithm::SHA256, | ||
| const StorePathSet & | references = {}, | ||
| PathFilter & | filter = defaultPathFilter ) const |
Read-only variant of addToStore(). It returns the store path for the given file system object.
| bool nix::StoreDirConfig::isInStore | ( | std::string_view | path | ) | const |
Display a set of paths in human-readable form (i.e., between quotes and separated by commas).
| bool nix::StoreDirConfig::isStorePath | ( | std::string_view | path | ) | const |
| StorePath nix::StoreDirConfig::makeStorePath | ( | std::string_view | type, |
| std::string_view | hash, | ||
| std::string_view | name ) const |
Constructs a unique store path name.
| StorePath nix::StoreDirConfig::parseStorePathCanonical | ( | std::string_view | path | ) | const |
Parse a store path, requiring canonical form. Rejects paths with trailing or excess path separators
Split a path like /nix/store/<hash>-<name>/<bla> into /nix/store/<hash>-<name> and /<bla>.