|
@@ -3,6 +3,8 @@
|
|
|
#include <stdlib.h>
|
|
|
#include <stdio.h>
|
|
|
|
|
|
+#include <sys/param.h> //for MAXPATHLEN - the maximal path length
|
|
|
+
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
@@ -143,4 +145,17 @@ bool FileName::isRelative() const {
|
|
|
return fileName.substr(0,1) != "/";
|
|
|
}
|
|
|
|
|
|
+bool FileName::convertToRealPath()
|
|
|
+{
|
|
|
+ char actualpath [MAXPATHLEN];
|
|
|
+ char *pRet = realpath( fileName.c_str(), actualpath);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ this->fileName = string( actualpath);
|
|
|
+ return true;
|
|
|
+}
|
|
|
+
|
|
|
}
|