MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / findPathWithExtension

Function findPathWithExtension

source/MRMesh/MRDirectory.cpp:6–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4{
5
6std::filesystem::path findPathWithExtension( const std::filesystem::path & pathWithoutExtension )
7{
8 std::error_code ec;
9 const auto fn = pathWithoutExtension.filename();
10 for ( auto dirEntry : Directory{ pathWithoutExtension.parent_path(), ec } )
11 {
12 if ( !dirEntry.is_regular_file( ec ) )
13 continue;
14 auto path = dirEntry.path();
15 if ( path.stem() == fn )
16 return path;
17 }
18 return {}; //not found
19}
20
21} // namespace MR

Callers 6

deserializeModel_Method · 0.85
deserializeModel_Method · 0.85
deserializeModel_Method · 0.85
DirectoryRecursiveClass · 0.85
deserializeModel_Method · 0.85
deserializeModel_Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected