BELFEM 0.9.0
Berkeley Lab Finite Element Framework
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//------------------------------------------------------------------------------
22namespace belfem
23{
24//------------------------------------------------------------------------------
25
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
USER GUIDES:
Definition cl_Capacitor.cpp:16
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
std::string make_path_parallel(const std::string &aPath)
this function takes a path and makes it parallel
Definition filetools.cpp:87
@ NEW
Definition cl_FEM_DofManagerBase.hpp:27
FileMode
Definition filetools.hpp:27
@ OPEN_RDONLY
Definition filetools.hpp:29
@ OPEN_RDWR
Definition filetools.hpp:31
@ OPEN_RDONLY_PARALLEL
Definition filetools.hpp:30
bool file_exists(const std::string &aPath)
this function tests if a file exists
Definition filetools.cpp:24