}
}
+SGPath SGPath::dirPath() const
+{
+ return SGPath::fromUtf8(dir());
+}
+
// get the base part of the path (everything but the extension.)
string SGPath::base() const
{
//------------------------------------------------------------------------------
+std::vector<SGPath> SGPath::pathsFromUtf8(const std::string& paths)
+{
+ std::vector<SGPath> r;
+ string_list items = sgPathSplit(paths);
+ string_list_iterator it;
+ for (it = items.begin(); it != items.end(); ++it) {
+ r.push_back(SGPath::fromUtf8(it->c_str()));
+ }
+
+ return r;
+}
+
+//------------------------------------------------------------------------------
+
std::vector<SGPath> SGPath::pathsFromLocal8Bit(const std::string& paths)
{
std::vector<SGPath> r;
* or if the destination already exists, or is not writeable
*/
bool rename(const SGPath& newName);
+
+
+ /**
+ * return the path of the parent directory of this path.
+ */
+ SGPath dirPath() const;
enum StandardLocation
{
static std::vector<SGPath> pathsFromEnv(const char* name);
+ static std::vector<SGPath> pathsFromUtf8(const std::string& paths);
+
static std::vector<SGPath> pathsFromLocal8Bit(const std::string& paths);
static std::string join(const std::vector<SGPath>& paths, const std::string& joinWith);