]> git.tdb.fi Git - libs/core.git/blobdiff - source/fs/dir.h
Store absolute path to argv[0] in Application
[libs/core.git] / source / fs / dir.h
index 6fa49f95d89c6abf02e12735dc2c7e2a0a5664e6..d62df8cde781896d30fc64a1f99091fa22c3fcef 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_FS_DIR_H_
 
 #include <list>
+#include <stdexcept>
 #include <string>
 #include "path.h"
 
@@ -42,18 +43,33 @@ Path get_home_dir();
 /// Returns a directory suitable for storing user-specific data
 Path get_user_data_dir(const std::string &appname);
 
+Path get_user_data_dir();
+
 /// Returns a directory containing system-wide configuration
 Path get_sys_conf_dir(const std::string &argv0);
 
+Path get_sys_conf_dir();
+
 /// Returns a directory containing immutable system-wide data
 Path get_sys_data_dir(const std::string &argv0, const std::string &appname);
 
+Path get_sys_data_dir();
+
 /// Returns a directory containing system-wide architecture-specific files
 Path get_sys_lib_dir(const std::string &argv0, const std::string &appname);
 
+Path get_sys_lib_dir();
+
 /// Changes the current working directory
 void chdir(const Path &);
 
+/** Looks for a file in a list of paths.  Returns the absolute path to the
+first existing location, or an empty Path if the file is not found at all. */
+Path path_lookup(const std::string &, const std::list<Path> &);
+
+/** Looks for a file using the PATH environment variable. */
+Path path_lookup(const std::string &);
+
 } // namespace FS
 } // namespace Msp