Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / utility / file.h
index f676ea9cc2affe31ed7334c43ab204b403e3a81c..ef837b4a842b5357bc6f38c68c0a56aff5a984e8 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
- * David van der Spoel, Berk Hess, Erik Lindahl, and including many
- * others, as listed in the AUTHORS file in the top-level source
- * directory and at http://www.gromacs.org.
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
  *
  * GROMACS is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -47,7 +47,7 @@
 
 #include <string>
 
-#include "common.h"
+#include "gromacs/utility/common.h"
 
 namespace gmx
 {
@@ -106,6 +106,17 @@ class File
          */
         void close();
 
+        /*! \brief
+         * Returns whether the file is an interactive terminal.
+         *
+         * Only works on Unix, otherwise always returns true.
+         * It only makes sense to call this for File::standardInput() and
+         * friends.
+         *
+         * Thie file must be open.
+         * Does not throw.
+         */
+        bool isInteractive() const;
         /*! \brief
          * Returns a file handle for interfacing with C functions.
          *
@@ -193,7 +204,7 @@ class File
         void writeLine();
 
         /*! \brief
-         * Checks whether a file exists.
+         * 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.