-
-std::string SauvLoaderTest::getResourceFile( const std::string& filename )
-{
- std::string resourceFile = "";
-
- if ( getenv("MEDCOUPLING_ROOT_DIR") ) {
- // use MEDCOUPLING_ROOT_DIR env.var
- resourceFile = getenv("MEDCOUPLING_ROOT_DIR");
- resourceFile += "/share/resources/med/";
- }
- else {
- resourceFile = get_current_dir_name();
- resourceFile += "/../../../resources/";
- }
-
- resourceFile += filename;
-#ifdef WIN32
- std::string fixedpath = resourceFile;
- for ( int i=0; i < fixedpath.length(); ++i )
- if (fixedpath[i] == '/')
- fixedpath[i] = '\\';
- return fixedpath;
-#endif
- return resourceFile;
-}