summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/File.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/OSSupport/File.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/OSSupport/File.h b/src/OSSupport/File.h
index 9987c41c7..b2099e9fd 100644
--- a/src/OSSupport/File.h
+++ b/src/OSSupport/File.h
@@ -185,3 +185,19 @@ private:
+
+/** A wrapper for file streams that enables exceptions. */
+template <class StreamType>
+class FileStream final : public StreamType
+{
+public:
+
+ FileStream(const std::string & Path);
+};
+
+
+
+
+
+using InputFileStream = FileStream<std::ifstream>;
+using OutputFileStream = FileStream<std::ofstream>;