]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Add AtomicFile::stream
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 30 Sep 2019 19:28:12 +0000 (21:28 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 5 Oct 2019 21:16:46 +0000 (23:16 +0200)
src/AtomicFile.hpp

index 546a765bbad5a9fb0b361cf375ac63c03fcca895..66d681bca2aeb7c89fa06a375a849db5d523c3a0 100644 (file)
@@ -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;
+}