diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2019-09-30 21:28:12 +0200 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2019-10-05 23:16:46 +0200 |
commit | f21f65d59de2a31b42494f3414dc9e549df861fa (patch) | |
tree | 5fe81f540d7dc811d7e032e67c6bf3948928472c | |
parent | 1616fc7f210695a0a2692c7ba9b216613b589155 (diff) | |
download | ccache-f21f65d59de2a31b42494f3414dc9e549df861fa.tar.gz |
Add AtomicFile::stream
-rw-r--r-- | src/AtomicFile.hpp | 8 |
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; +} |