• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openmc-dev / openmc / 15371300071

01 Jun 2025 05:04AM UTC coverage: 85.143% (+0.3%) from 84.827%
15371300071

Pull #3176

github

web-flow
Merge 4f739184a into cb95c784b
Pull Request #3176: MeshFilter rotation - solution to issue #3166

86 of 99 new or added lines in 4 files covered. (86.87%)

3707 existing lines in 117 files now uncovered.

52212 of 61323 relevant lines covered (85.14%)

42831974.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.65
/src/file_utils.cpp
1
#include "openmc/file_utils.h"
2

3
#include <filesystem>
4

5
namespace openmc {
6

7
bool dir_exists(const std::string& path)
379✔
8
{
9
  std::filesystem::path d(path);
379✔
10
  return std::filesystem::is_directory(d);
758✔
11
}
379✔
12

13
bool file_exists(const std::string& filename)
6,780,730✔
14
{
15
  std::filesystem::path p(filename);
6,780,730✔
16
  if (!std::filesystem::exists(p)) {
6,780,730✔
17
    return false;
46,555✔
18
  }
19
  if (std::filesystem::is_directory(p)) {
6,734,175✔
UNCOV
20
    return false;
×
21
  }
22
  return true;
6,734,175✔
23
}
6,780,730✔
24

25
std::string dir_name(const std::string& filename)
98✔
26
{
27
  std::filesystem::path p(filename);
98✔
28
  return (p.parent_path()).string();
294✔
29
}
98✔
30

31
std::string get_file_extension(const std::string& filename)
10,698✔
32
{
33
  std::filesystem::path p(filename);
10,698✔
34
  auto ext = p.extension();
10,698✔
35
  if (!ext.empty()) {
10,698✔
36
    // path::extension includes the period
37
    return ext.string().substr(1);
21,306✔
38
  }
39
  return "";
45✔
40
}
10,698✔
41

42
} // namespace openmc
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc