Remove gmx::File (except for File::exists())
[alexxy/gromacs.git] / src / gromacs / utility / filestream.h
index f1e49339ca21e7e0900ea65bc0422069045c0089..23c354c344166f3928b97e02e937440db3b6af6a 100644 (file)
@@ -103,6 +103,19 @@ class StandardInputStream : public TextInputStream
 class TextInputFile : public TextInputStream
 {
     public:
+        /*! \brief
+         * Opens a file and returns a `FILE` handle.
+         *
+         * \param[in] filename  Path of the file to open.
+         * \throws    FileIOError on any I/O error.
+         *
+         * Instead of returning `NULL` on errors, throws an exception with
+         * additional details (including the file name and `errno`).
+         */
+        static FILE *openRawHandle(const char *filename);
+        //! \copydoc openRawHandle(const char *, const char *)
+        static FILE *openRawHandle(const std::string &filename);
+
         /*! \brief
          * Opens a text file as a stream.
          *