From 0658ef369e9dc27ca3a16075fc0f9e20931a2350 Mon Sep 17 00:00:00 2001 From: Alberto Sartori Date: Tue, 31 Jan 2023 12:18:32 +0100 Subject: LocalStorage: add StoreTree(std::filesystem::path const &) --- src/buildtool/execution_api/local/local_storage.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/buildtool/execution_api/local/local_storage.hpp b/src/buildtool/execution_api/local/local_storage.hpp index 786d23d5..dc9316f8 100644 --- a/src/buildtool/execution_api/local/local_storage.hpp +++ b/src/buildtool/execution_api/local/local_storage.hpp @@ -57,6 +57,11 @@ class LocalStorage { return cas_tree_.StoreBlobFromBytes(bytes); } + [[nodiscard]] auto StoreTree(std::filesystem::path const& file_path) + const noexcept -> std::optional { + return cas_tree_.StoreBlobFromFile(file_path); + } + /// \brief Obtain blob path from digest with x-bit. /// NOLINTNEXTLINE(misc-no-recursion) [[nodiscard]] auto BlobPath(bazel_re::Digest const& digest, -- cgit v1.2.3