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

openmc-dev / openmc / 19476608580

18 Nov 2025 06:15PM UTC coverage: 81.528% (-0.4%) from 81.961%
19476608580

Pull #3339

github

web-flow
Merge 25c21d84d into 7815d3a68
Pull Request #3339: Enable Scikit-Build-Core Support

16890 of 23555 branches covered (71.7%)

Branch coverage included in aggregate %.

34 of 34 new or added lines in 3 files covered. (100.0%)

376 existing lines in 7 files now uncovered.

54523 of 64038 relevant lines covered (85.14%)

42168701.72 hits per line

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

80.43
/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)
260✔
8
{
9
  std::filesystem::path d(path);
260✔
10
  return std::filesystem::is_directory(d);
520✔
11
}
260✔
12

13
bool file_exists(const std::string& filename)
5,654,303✔
14
{
15
  std::filesystem::path p(filename);
5,654,303✔
16
  if (!std::filesystem::exists(p)) {
5,654,303✔
17
    return false;
38,344✔
18
  }
19
  if (std::filesystem::is_directory(p)) {
5,615,959!
20
    return false;
×
21
  }
22
  return true;
5,615,959✔
23
}
5,654,303✔
24

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

31
std::string get_file_extension(const std::string& filename)
8,881✔
32
{
33
  std::filesystem::path p(filename);
8,881✔
34
  auto ext = p.extension();
8,881✔
35
  if (!ext.empty()) {
8,881!
36
    // path::extension includes the period
37
    return ext.string().substr(1);
17,762✔
38
  }
UNCOV
39
  return "";
×
40
}
8,881✔
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

© 2025 Coveralls, Inc