bool CreatedMultipleDirectory( char* direct)
bool CreatedMultipleDirectory( char* direct)
{
string Directoryname = direct;
if ( Directoryname[Directoryname.length() - 1] != '\\' )
{
//Directoryname +=
Directoryname.append( 1, '\\');
}
std::vector<string> vpath;
string strtemp;
bool bSuccess = false;
for ( int i = 0; i < Directoryname.length(); i++ )
{
if ( Directoryname[i] != '\\')
{
strtemp.append( 1,Directoryname[i] );
}
else
{
vpath.push_back( strtemp );
strtemp.append( 1, '\\' );
}
}
std::vector<string>:: const_iterator vIter;
for ( vIter = vpath.begin();vIter != vpath.end(); vIter++ )
{
bSuccess = CreateDirectory( vIter->c_str(), NULL ) ? true :false;
}
return bSuccess;
}