diff options
Diffstat (limited to 'src/buildtool/common/artifact_blob.hpp')
-rw-r--r-- | src/buildtool/common/artifact_blob.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
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 <filesystem> #include <functional> #include <memory> +#include <optional> #include <string> #include <utility> #include <variant> @@ -111,6 +112,12 @@ class ArtifactBlob final { [[nodiscard]] auto ReadIncrementally(std::size_t chunk_size) const& noexcept -> expected<IncrementalReader, std::string>; + /// \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<std::filesystem::path>; + /// \brief Set executable permission. void SetExecutable(bool is_executable) noexcept { is_executable_ = is_executable; |