From 538c7f3e180a5f121c6819ad5d9b14f843512f60 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Fri, 28 Feb 2025 16:59:32 +0100 Subject: ArtifactBlob: Return file path --- src/buildtool/common/artifact_blob.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/buildtool/common/artifact_blob.hpp') diff --git a/src/buildtool/common/artifact_blob.hpp b/src/buildtool/common/artifact_blob.hpp index 1e54f71b..1847e536 100644 --- a/src/buildtool/common/artifact_blob.hpp +++ b/src/buildtool/common/artifact_blob.hpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -111,6 +112,12 @@ class ArtifactBlob final { [[nodiscard]] auto ReadIncrementally(std::size_t chunk_size) const& noexcept -> expected; + /// \brief Obtain the path to the file that is used as the content source. + /// If ArtifactBlob doesn't use a filesystem source or an internal error + /// occurs, std::nullopt is returned. + [[nodiscard]] auto GetFilePath() const& noexcept + -> std::optional; + /// \brief Set executable permission. void SetExecutable(bool is_executable) noexcept { is_executable_ = is_executable; -- cgit v1.2.3