- if( !cpExtensions::Write( buffer.str( ), fname.str( ) ) )
- throw std::runtime_error( "Error writing environment file." );
-}
-
-// -------------------------------------------------------------------------
-void cpPlugins::Interface::Plugins::
-OpenEnvironments( const std::string& dir )
-{
- std::vector< std::string > tokens;
- cpExtensions::Tokenize( tokens, dir, cpPlugins_ENV_SEPARATOR );
- for( auto tIt = tokens.begin( ); tIt != tokens.end( ); ++tIt )
- {
- std::stringstream fname;
- fname << *tIt;
- if( !cpExtensions::IsPathSeparator( dir.back( ) ) )
- fname << cpExtensions_PATH_SEPARATOR;
- fname << cpPlugins_PATHS;