Remove gmx::File (except for File::exists())
[alexxy/gromacs.git] / src / gromacs / utility / textreader.h
index 0310f1a0618c847b965103a51a797ab4b4b2b606..62607c6499bebb7e11337eaf67d2c6cb6c972ffe 100644 (file)
@@ -67,6 +67,18 @@ namespace gmx
 class TextReader
 {
     public:
+        /*! \brief
+         * Reads contents of a file to a std::string.
+         *
+         * \param[in] filename  Name of the file to read.
+         * \returns   The contents of \p filename.
+         * \throws    std::bad_alloc if out of memory.
+         * \throws    FileIOError on any I/O error.
+         */
+        static std::string readFileToString(const char *filename);
+        //! \copydoc readFileToString(const char *)
+        static std::string readFileToString(const std::string &filename);
+
         /*! \brief
          * Creates a reader that reads from specified file.
          *