23 namespace fs = std::filesystem;
25 fs::path dir( path_str );
28 if ( !fs::exists( dir, ec ) )
31 if ( !fs::create_directories( dir, ec ) )
36 else if ( !fs::is_empty( dir, ec ) )
51 Kokkos::abort( (
"Could not prepare empty directory with path '" + path_str +
"'." ).c_str() );
MPIRank rank()
Definition mpi.hpp:10
bool prepare_empty_directory(const std::string &path_str, bool root_only=true)
Prepares an empty directory with the passed path.
Definition filesystem.hpp:16
void prepare_empty_directory_or_abort(const std::string &path_str, bool root_only=true)
Like prepare_empty_directory() but aborts if empty directory could not be prepared successfully.
Definition filesystem.hpp:47