return result;
}
+/**
+Creates the given directory and any parent directories if needed.
+
+@param path The path to create
+@param mode Access mode for new directories
+
+@return 0 on success, -1 on error
+*/
int mkpath(const Path &path, int mode)
{
Path p;
return result;
}
+/**
+Extracts the basename from the given path. Same thing as Path::Path(p)[-1],
+but faster.
+*/
+string basename(const std::string &p);
+{
+ unsigned slash=p.rfind(DIRCHAR);
+ if(slash==string::npos)
+ return p;
+ else
+ return p.substr(slash+1);
+}
+
} // namespace Path
} // namespace Msp