return dir;
}
+Path get_sys_lib_dir(const string &argv0, const string &appname)
+{
+ Path dir=get_bin_dir(argv0);
+
+ if(dir[-1]=="bin" || dir[-1]=="sbin")
+ return dir/".."/"lib"/appname;
+ else
+ return dir;
+}
+
void chdir(const Path &path)
{
if(::chdir(path.str().c_str())==-1)
/// Returns a directory containing immutable system-wide data
Path get_sys_data_dir(const std::string &argv0, const std::string &appname);
+/// Returns a directory containing system-wide architecture-specific files
+Path get_sys_lib_dir(const std::string &argv0, const std::string &appname);
+
/// Changes the current working directory
void chdir(const Path &);