diff options
author | Alberto Sartori <alberto.sartori@huawei.com> | 2023-01-31 12:18:32 +0100 |
---|---|---|
committer | Alberto Sartori <alberto.sartori@huawei.com> | 2023-02-02 16:16:42 +0100 |
commit | 0658ef369e9dc27ca3a16075fc0f9e20931a2350 (patch) | |
tree | c4ecb70bcf3972f4c36cc0f89f27288041d79397 /src | |
parent | 0dfd8029176212ea41e7a8eda7fabcb57705c3e3 (diff) | |
download | justbuild-0658ef369e9dc27ca3a16075fc0f9e20931a2350.tar.gz |
LocalStorage: add StoreTree(std::filesystem::path const &)
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/execution_api/local/local_storage.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
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<bazel_re::Digest> { + 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, |