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
5#include <string>
6
7#ifdef _WIN32
8using mode_t = unsigned short;
9#else
10#include <sys/types.h> // for mode_t
11#endif
12
13namespace amrex::FileSystem {
14
28bool
29CreateDirectories (std::string const& path, mode_t mode, bool verbose = false);
30
37std::string
39
48bool
49Exists (std::string const& filename);
50
57bool
58Remove (std::string const& filename);
59
67bool
68RemoveAll (std::string const& p);
69
70}
71
72#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