prophet0
21st February 2012, 19:55
What I'm trying to accomplish is have my application check to see if some directories exist
if ttm does not make it if it does then go on to clients if it don't exist then make it and if its there continue to clientdir and campaigndir
this is the current solution im currently trying to figure out..
QDir ttmDir("/ttm");
QDir clientsDir("/ttm/clients");
QDir clientDir("/ttm/clients/" + clientID.toInt());
QDir campaignDir(campaignID);
//Check to see if "/ttm" is there or not if not make it..
if(!ttmDir.exists())
{
QDir().mkdir("/ttm");
qDebug() << "ttm didnt exist creating it";
}
if (ttmDir.exists())
{
qDebug() << "ttm exist so lets check clientsDir";
if(!clientsDir.exists())
{
qDebug() << "clientsDir does not exist creating it...";
QDir().mkdir("/ttm/clients");
}else
{
qDebug() << "clientsDir exist lets check clientDir";
}
}
if (!clientDir.exists())
{
qDebug() << "clientDir does not exist creating it...";
QDir().mkdir("/ttm/clients/" + clientID.toInt());
}
"QDir().mkdir("/ttm/clients/" + clientID.toInt());" = 16
but it will not create the folder 16 within /ttm/clients/ ie: "/ttm/clients/16"
nothing I do will make it work i checked file permissions and even tried using system(""); to accomplish this task but still will not work..
does anyone have any suggestions?
if ttm does not make it if it does then go on to clients if it don't exist then make it and if its there continue to clientdir and campaigndir
this is the current solution im currently trying to figure out..
QDir ttmDir("/ttm");
QDir clientsDir("/ttm/clients");
QDir clientDir("/ttm/clients/" + clientID.toInt());
QDir campaignDir(campaignID);
//Check to see if "/ttm" is there or not if not make it..
if(!ttmDir.exists())
{
QDir().mkdir("/ttm");
qDebug() << "ttm didnt exist creating it";
}
if (ttmDir.exists())
{
qDebug() << "ttm exist so lets check clientsDir";
if(!clientsDir.exists())
{
qDebug() << "clientsDir does not exist creating it...";
QDir().mkdir("/ttm/clients");
}else
{
qDebug() << "clientsDir exist lets check clientDir";
}
}
if (!clientDir.exists())
{
qDebug() << "clientDir does not exist creating it...";
QDir().mkdir("/ttm/clients/" + clientID.toInt());
}
"QDir().mkdir("/ttm/clients/" + clientID.toInt());" = 16
but it will not create the folder 16 within /ttm/clients/ ie: "/ttm/clients/16"
nothing I do will make it work i checked file permissions and even tried using system(""); to accomplish this task but still will not work..
does anyone have any suggestions?