summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2019-09-30 21:28:12 +0200
committerJoel Rosdahl <joel@rosdahl.net>2019-10-05 23:16:46 +0200
commitf21f65d59de2a31b42494f3414dc9e549df861fa (patch)
tree5fe81f540d7dc811d7e032e67c6bf3948928472c
parent1616fc7f210695a0a2692c7ba9b216613b589155 (diff)
downloadccache-f21f65d59de2a31b42494f3414dc9e549df861fa.tar.gz
Add AtomicFile::stream
-rw-r--r--src/AtomicFile.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/AtomicFile.hpp b/src/AtomicFile.hpp
index 546a765b..66d681bc 100644
--- a/src/AtomicFile.hpp
+++ b/src/AtomicFile.hpp
@@ -34,6 +34,8 @@ public:
AtomicFile(const std::string& destination_path, Mode mode);
~AtomicFile();
+ FILE* stream();
+
void write(const std::string& data);
void write(const std::vector<uint8_t>& data);
@@ -47,3 +49,9 @@ private:
std::string m_tmp_path;
FILE* m_stream;
};
+
+inline FILE*
+AtomicFile::stream()
+{
+ return m_stream;
+}