Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
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
10#include <string>
11
12#ifdef _WIN32
13using mode_t = unsigned short;
14#else
15#include <sys/types.h> // for mode_t
16#endif
17
18namespace amrex::FileSystem {
19
33bool
34CreateDirectories (std::string const& path, mode_t mode, bool verbose = false);
35
42std::string
44
53bool
54Exists (std::string const& filename);
55
62bool
63Remove (std::string const& filename);
64
72bool
73RemoveAll (std::string const& p);
74
75}
76
77#endif
Definition AMReX_FileSystem.cpp:15
bool Exists(std::string const &filename)
Check if the given path exists. Symbolic links are checked without following the link,...
Definition AMReX_FileSystem.cpp:18
bool CreateDirectories(std::string const &path, mode_t mode, bool verbose)
Create a directory and any missing parent directories.
Definition AMReX_FileSystem.cpp:82
bool RemoveAll(std::string const &p)
Recursively remove a path.
Definition AMReX_FileSystem.cpp:52
std::string CurrentPath()
Return the current working directory.
Definition AMReX_FileSystem.cpp:30
bool Remove(std::string const &filename)
Remove a file, symbolic link, or empty directory.
Definition AMReX_FileSystem.cpp:41