aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/binary-cache-store.cc12
-rw-r--r--src/libstore/binary-cache-store.hh2
-rw-r--r--src/libstore/http-binary-cache-store.cc2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/libstore/binary-cache-store.cc b/src/libstore/binary-cache-store.cc
index 7df55a32d..07c722016 100644
--- a/src/libstore/binary-cache-store.cc
+++ b/src/libstore/binary-cache-store.cc
@@ -38,7 +38,7 @@ void BinaryCacheStore::init()
{
std::string cacheInfoFile = "nix-cache-info";
- auto cacheInfo = getFile(cacheInfoFile);
+ auto cacheInfo = getFileContents(cacheInfoFile);
if (!cacheInfo) {
upsertFile(cacheInfoFile, "StoreDir: " + storeDir + "\n", "text/x-nix-cache-info");
} else {
@@ -69,10 +69,10 @@ void BinaryCacheStore::upsertFile(const std::string & path,
void BinaryCacheStore::getFile(const std::string & path, Sink & sink)
{
- sink(*getFile(path));
+ sink(*getFileContents(path));
}
-std::optional<std::string> BinaryCacheStore::getFile(const std::string & path)
+std::optional<std::string> BinaryCacheStore::getFileContents(const std::string & path)
{
StringSink sink;
try {
@@ -359,7 +359,7 @@ std::shared_ptr<const ValidPathInfo> BinaryCacheStore::queryPathInfoUncached(con
auto narInfoFile = narInfoFileFor(storePath);
- auto data = getFile(narInfoFile);
+ auto data = getFileContents(narInfoFile);
if (!data) return nullptr;
@@ -446,7 +446,7 @@ std::shared_ptr<const Realisation> BinaryCacheStore::queryRealisationUncached(co
{
auto outputInfoFilePath = realisationsPrefix + "/" + id.to_string() + ".doi";
- auto data = getFile(outputInfoFilePath);
+ auto data = getFileContents(outputInfoFilePath);
if (!data) return {};
auto realisation = Realisation::fromJSON(
@@ -486,7 +486,7 @@ std::optional<std::string> BinaryCacheStore::getBuildLogExact(const StorePath &
debug("fetching build log from binary cache '%s/%s'", getUri(), logPath);
- return getFile(logPath);
+ return getFileContents(logPath);
}
void BinaryCacheStore::addBuildLog(const StorePath & drvPath, std::string_view log)
diff --git a/src/libstore/binary-cache-store.hh b/src/libstore/binary-cache-store.hh
index 510965d12..cd963fbf9 100644
--- a/src/libstore/binary-cache-store.hh
+++ b/src/libstore/binary-cache-store.hh
@@ -85,7 +85,7 @@ public:
*/
virtual void getFile(const std::string & path, Sink & sink);
- virtual std::optional<std::string> getFile(const std::string & path);
+ virtual std::optional<std::string> getFileContents(const std::string & path);
public:
diff --git a/src/libstore/http-binary-cache-store.cc b/src/libstore/http-binary-cache-store.cc
index 8cbb50ee9..f64da2569 100644
--- a/src/libstore/http-binary-cache-store.cc
+++ b/src/libstore/http-binary-cache-store.cc
@@ -164,7 +164,7 @@ protected:
}
}
- std::optional<std::string> getFile(const std::string & path) override
+ std::optional<std::string> getFileContents(const std::string & path) override
{
checkEnabled();