29#include "xvasprintf.h"
32 size_t end = path.find_last_of(
"\\");
33 if (end == std::string::npos) {
34 return std::string(path);
36 return path.substr(end+1);
40 char *f1 = xstrdup(path);
41 char *p = f1 + strlen(f1);
49 while ((p > f1) && (*p !=
'/') && (*p !=
'\\')) {
68 if (!strcmp(path,
"..")) {
71 if ((path[0] !=
'/') && (path[0] !=
'\\') && (path[1] !=
':')) {
73 f1 = xasprintf(
"%s%s", relativeToPath, path);
81 for (
char *p = f1; *p; p++) {
static std::string getEPOCBasename(std::string path)
Returns the last path component of an EPOC path.
static char * resolveEPOCPath(const char *path, const char *initialPath)
Returns a new absolute EPOC path, determined by resolving path relative to initialPath.
static char * getEPOCDirname(const char *path)
Compute parent directory of an EPOC directory.