BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
filetools.hpp
Go to the documentation of this file.
1
/*
2
* BELFEM -- The Berkeley Lab Finite Element Framework
3
* Copyright (c) 2026, The Regents of the University of California,
4
* through Lawrence Berkeley National Laboratory (subject to receipt of any required
5
* approvals from the U.S. Dept. of Energy). All rights reserved.
6
*
7
* Developers: Christian Messe, Gregory Giard
8
*
9
* See the top-level LICENSE file for the complete license and disclaimer.
10
*/
11
12
#ifndef BELFEM_FILE_TOOLS_HPP
13
#define BELFEM_FILE_TOOLS_HPP
14
15
#include <cstdio>
16
#include <fstream>
17
#include <string>
18
19
#include "
stringtools.hpp
"
20
21
//------------------------------------------------------------------------------
22
namespace
belfem
23
{
24
//------------------------------------------------------------------------------
25
26
enum class
FileMode
27
{
28
NEW
,
29
OPEN_RDONLY
,
30
OPEN_RDONLY_PARALLEL
,
31
OPEN_RDWR
32
};
33
34
//------------------------------------------------------------------------------
35
41
bool
42
file_exists
(
const
std::string & aPath );
43
44
//------------------------------------------------------------------------------
45
49
std::string
50
make_path_parallel
(
const
std::string & aPath );
51
52
//------------------------------------------------------------------------------
53
85
std::string
86
search_data_file
(
const
std::string & aFile,
87
const
std::string & aSubDirectory );
88
89
//------------------------------------------------------------------------------
90
}
/* namespace belfem */
91
//------------------------------------------------------------------------------
92
#endif
//BELFEM_FILE_TOOLS_HPP
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::search_data_file
std::string search_data_file(const std::string &aFile, const std::string &aSubDirectory)
Resolve a data file named in an input file, looking below aSubDirectory of the shared data directory.
Definition
filetools.cpp:32
belfem::make_path_parallel
std::string make_path_parallel(const std::string &aPath)
this function takes a path and makes it parallel
Definition
filetools.cpp:87
belfem::DofManagerType::NEW
@ NEW
Definition
cl_FEM_DofManagerBase.hpp:27
belfem::FileMode
FileMode
Definition
filetools.hpp:27
belfem::FileMode::OPEN_RDONLY
@ OPEN_RDONLY
Definition
filetools.hpp:29
belfem::FileMode::OPEN_RDWR
@ OPEN_RDWR
Definition
filetools.hpp:31
belfem::FileMode::OPEN_RDONLY_PARALLEL
@ OPEN_RDONLY_PARALLEL
Definition
filetools.hpp:30
belfem::file_exists
bool file_exists(const std::string &aPath)
this function tests if a file exists
Definition
filetools.cpp:24
stringtools.hpp
src
io
filetools.hpp
Generated by
1.18.0