dir.cpp

00001 #include <util/dir.h>
00002 
00003 #include <qdir.h>
00004 
00005 namespace util
00006 {
00007   std::string absoluteDir( std::string filename, std::string current_dir )
00008   {
00009     QString fn = QString::fromStdString(filename);
00010     if( QDir::isRelativePath( fn ) )
00011     {
00012       if(current_dir.empty())
00013       {
00014         fn = QDir::cleanPath( QDir::currentPath() + "/" + fn );
00015       }
00016       else
00017       {
00018         QString curdir = QString::fromStdString(current_dir);
00019         fn = QDir::cleanPath( curdir + "/" + fn );
00020       }
00021     }
00022     return fn.toStdString();
00023   }
00024 }
00025 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Fri May 31 15:37:53 2013 for VVE by  doxygen 1.6.3