1 #ifndef DUNE_FEM_IO_HH
2 #define DUNE_FEM_IO_HH
3 
4 #include <iostream>
5 
6 namespace Dune
7 {
8 
9   namespace Fem
10   {
11 
12     /** \brief create a directory
13      *
14      *  \param[in]  name  name of the directory to create
15      *
16      *  \returns whether the directory has been successfully created
17      */
18     bool createDirectory ( const std::string &name );
19 
20     /** \brief check whether a file exists
21      *
22      *  \param[in]  name  name of the file to check
23      *
24      *  \return true if the file exists, false otherwise
25      */
26     bool fileExists ( const std::string &name );
27 
28     /** \brief check whether a directory exists
29      *
30      *  \param[in]  name  name of the directory to check
31      *
32      *  \returns true if the directory exists, false otherwise
33      */
34     bool directoryExists ( const std::string &name );
35 
36     /** \brief executes a command and return the output
37      *
38      *  \param[in]  command   command to execute
39      *
40      *  \returns the output of the executed command
41      *
42      *  \note  This command throws an exception if the command
43      *         returns unsuccsessfully.
44      */
45     std::string executeCommand ( const std::string &command );
46 
47   } // namespace Fem
48 
49 } // namespace Dune
50 
51 #include "io.cc"
52 
53 #endif // #ifndef DUNE_FEM_IO_HH
54