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

Method isPythonScript

source/MREmbeddedPython/MREmbeddedPython.cpp:88–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88bool EmbeddedPython::isPythonScript( const std::filesystem::path& path )
89{
90 std::error_code ec;
91 if ( !std::filesystem::exists( path, ec ) )
92 return false;
93 if ( !std::filesystem::is_regular_file( path, ec ) )
94 return false;
95
96 auto ext = utf8string( path.extension() );
97 for ( auto& c : ext )
98 c = (char)std::tolower( (unsigned char)c );
99
100 if ( ext != ".py" )
101 return false;
102
103 return true;
104}
105
106EmbeddedPython::EmbeddedPython()
107{

Callers

nothing calls this directly

Calls 1

utf8stringFunction · 0.85

Tested by

no test coverage detected