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

openmc-dev / openmc / 19795099684

30 Nov 2025 06:38AM UTC coverage: 81.545% (-0.5%) from 82.055%
19795099684

Pull #3339

github

web-flow
Merge 47e5a263d into ef22558f4
Pull Request #3339: Enable Scikit-Build-Core Support

16899 of 23552 branches covered (71.75%)

Branch coverage included in aggregate %.

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

383 existing lines in 8 files now uncovered.

54550 of 64067 relevant lines covered (85.15%)

42133974.15 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,676,683✔
14
{
15
  std::filesystem::path p(filename);
5,676,683✔
16
  if (!std::filesystem::exists(p)) {
5,676,683✔
17
    return false;
38,479✔
18
  }
19
  if (std::filesystem::is_directory(p)) {
5,638,204!
20
    return false;
×
21
  }
22
  return true;
5,638,204✔
23
}
5,676,683✔
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