Logo Search packages:      
Sourcecode: inkscape version File versions

String buildtool::MakeBase::getNativePath ( const String &  path  )  [protected, inherited]

Return the native format of the canonical path which we store

Definition at line 3409 of file buildtool.cpp.

Referenced by buildtool::MakeBase::copyFile(), buildtool::MakeBase::createDirectory(), buildtool::MakeBase::isDirectory(), buildtool::MakeBase::isNewerThan(), buildtool::MakeBase::isRegularFile(), buildtool::MakeBase::listDirectories(), buildtool::MakeBase::listFiles(), and buildtool::MakeBase::removeDirectory().

{
#ifdef __WIN32__
    String npath;
    unsigned int firstChar = 0;
    if (path.size() >= 3)
        {
        if (path[0] == '/' &&
            isalpha(path[1]) &&
            path[2] == ':')
            firstChar++;
        }
    for (unsigned int i=firstChar ; i<path.size() ; i++)
        {
        char ch = path[i];
        if (ch == '/')
            npath.push_back('\\');
        else
            npath.push_back(ch);
        }
    return npath;
#else
    return path;
#endif
}


Generated by  Doxygen 1.6.0   Back to index