return access(path.str().c_str(), F_OK)==0;
}
+bool is_dir(const Path &path)
+{
+ struct stat st;
+ if(stat(path, st)==0)
+ return S_ISDIR(st.st_mode);
+ return false;
+}
+
Filename splitext(const string &fn)
{
Filename result;
return ::getcwd(buf, sizeof(buf));
}
+Path get_home_dir()
+{
+#ifndef WIN32
+ const char *home=getenv("HOME");
+ if(home)
+ return home;
+ return ".";
+#else
+ return ".";
+#endif
+}
+
} // namespace Msp