+void mkdir(const Path &path, int mode)
+{
+ int err;
+#ifdef WIN32
+ // The win32 version of this function doesn't take the mode argument. Go figure.
+ (void)mode;
+ err=::mkdir(path.str().c_str());
+#else
+ err=::mkdir(path.str().c_str(), mode);
+#endif
+
+ if(err==-1)
+ throw SystemError("mkdir failed", errno);
+}
+
+/**
+Creates a 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
+*/
+void mkpath(const Path &path, int mode)