Block-Structured AMR Software Framework
AMReX_FileSystem.H
Go to the documentation of this file.
1 #ifndef AMREX_FILE_SYSTEM_H_
2 #define AMREX_FILE_SYSTEM_H_
3 #include <AMReX_Config.H>
4 
5 #include <string>
6 
7 #ifdef _WIN32
8 using mode_t = unsigned short;
9 #else
10 #include <sys/types.h> // for mode_t
11 #endif
12 
13 namespace amrex::FileSystem {
14 
15 bool
16 CreateDirectories (std::string const& path, mode_t mode, bool verbose = false);
17 
18 std::string
19 CurrentPath ();
20 
21 bool
22 Exists (std::string const& filename);
23 
24 bool
25 Remove (std::string const& filename);
26 
27 bool
28 RemoveAll (std::string const& p); // recursive remove
29 
30 }
31 
32 #endif
Definition: AMReX_FileSystem.cpp:76
bool Remove(std::string const &filename)
Definition: AMReX_FileSystem.cpp:190
bool RemoveAll(std::string const &p)
Definition: AMReX_FileSystem.cpp:196
bool CreateDirectories(std::string const &path, mode_t mode, bool verbose)
Definition: AMReX_FileSystem.cpp:79
std::string CurrentPath()
Definition: AMReX_FileSystem.cpp:176
bool Exists(std::string const &filename)
Definition: AMReX_FileSystem.cpp:169
int verbose
Definition: AMReX_DistributionMapping.cpp:36