1 | #include <QtCore>
|
---|
2 |
|
---|
3 | #include <QDebug>
|
---|
4 |
|
---|
5 | #include <stdlib.h>
|
---|
6 | #include <InnoTekLIBC/pathrewrite.h>
|
---|
7 |
|
---|
8 | #define STR(expr) #expr
|
---|
9 | #define DBG(expr) STR(expr) << "=" << (expr)
|
---|
10 |
|
---|
11 | ////////////////////////////////////////////////////////////////////////////////
|
---|
12 |
|
---|
13 | int main(int argc, char *argv[])
|
---|
14 | {
|
---|
15 | char buf[260];
|
---|
16 |
|
---|
17 | qDebug() << DBG((_abspath(buf, "/@unixroot/usr", sizeof(buf)), buf));
|
---|
18 | qDebug() << DBG((_fullpath(buf, "/@unixroot/usr", sizeof(buf)), buf));
|
---|
19 | qDebug() << DBG(realpath("/@unixroot/usr", buf));
|
---|
20 |
|
---|
21 | qDebug() << DBG((_fullpath(buf, "D:/@unixroot/usr", sizeof(buf)), buf));
|
---|
22 | qDebug() << DBG(realpath("D:/@unixroot/usr", buf));
|
---|
23 |
|
---|
24 | qDebug() << DBG((__libc_PathRewrite("/@unixroot/usr", buf, sizeof(buf)), buf));
|
---|
25 |
|
---|
26 | qDebug() << DBG(QDir(".").absolutePath());
|
---|
27 |
|
---|
28 | qDebug() << DBG(QDir("/").absolutePath());
|
---|
29 | qDebug() << DBG(QDir("/").canonicalPath());
|
---|
30 | qDebug() << DBG(QDir("/").absoluteFilePath(""));
|
---|
31 |
|
---|
|
---|