X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Futility%2Fpath.h;h=8dba41e84c0f1947cb21c62b907eb601e4ad911e;hb=1d597ac0415f9a847715ef65daa55fe1312bd59f;hp=ef2b3e884879ca7c7ecbc8ea4f282037379b8911;hpb=8bb9e38caa59684b3731a434a603c78beaf9a87a;p=alexxy%2Fgromacs.git diff --git a/src/gromacs/utility/path.h b/src/gromacs/utility/path.h index ef2b3e8848..8dba41e84c 100644 --- a/src/gromacs/utility/path.h +++ b/src/gromacs/utility/path.h @@ -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 {