BmnRoot 26.10.0-233-gb9bbe585
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnIFileReader.cxx
Go to the documentation of this file.
1// headers from this target
2#include "BmnIFileReader.h"
3
4// o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
5// ================== BmnIFileReader protected method ==================
6// o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
7
8bool BmnIFileReader::PerformStandardChecksBeforeOpening(const std::filesystem::path& aFilePath) const noexcept
9{
10 std::error_code anError{};
11 if (!std::filesystem::exists(aFilePath, anError) || !std::filesystem::is_regular_file(aFilePath, anError)) {
12 if (anError != std::error_code{}) {
13 LOG(error) << "Filesystem error while reading " << aFilePath << '\n';
14 } else {
15 LOG(error) << "File doesn't exist! Path: " << aFilePath << '\n';
16 }
17 return false;
18 }
19 return true;
20}
bool PerformStandardChecksBeforeOpening(const std::filesystem::path &aFilePath) const noexcept