Remove gmx::File (except for File::exists())
[alexxy/gromacs.git] / src / gromacs / utility / path.h
index ef2b3e884879ca7c7ecbc8ea4f282037379b8911..8dba41e84c0f1947cb21c62b907eb601e4ad911e 100644 (file)
@@ -85,6 +85,25 @@ class Path
         Path();
 };
 
+class File
+{
+    public:
+        /*! \brief
+         * Checks whether a file exists and is a regular file.
+         *
+         * \param[in] filename  Path to the file to check.
+         * \returns   `true` if \p filename exists and is accessible.
+         *
+         * Does not throw.
+         */
+        static bool exists(const char *filename);
+        //! \copydoc exists(const char *)
+        static bool exists(const std::string &filename);
+
+    private:
+        // Disallow instantiation.
+        File();
+};
 
 class Directory
 {