X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ffs%2Fdir.h;h=89d86ed9383c0f99661d80d1b169d82c87a2a585;hb=9c8bb278a26c0c4356d6ee5e66d3f34c70521fb8;hp=6fa49f95d89c6abf02e12735dc2c7e2a0a5664e6;hpb=19edaf3b45bc4c23459fc8ddd552dcfa33eecc71;p=libs%2Fcore.git diff --git a/source/fs/dir.h b/source/fs/dir.h index 6fa49f9..89d86ed 100644 --- a/source/fs/dir.h +++ b/source/fs/dir.h @@ -2,7 +2,9 @@ #define MSP_FS_DIR_H_ #include +#include #include +#include #include "path.h" namespace Msp { @@ -36,23 +38,42 @@ std::list list_filtered(const Path &path, const std::string &filter /// Returns the current working directory Path getcwd(); +/// Changes the current working directory +void chdir(const Path &); + /// Returns the user's home directory Path get_home_dir(); -/// Returns a directory suitable for storing user-specific data -Path get_user_data_dir(const std::string &appname); +/// Deprecated. Use the argument-less version instead. +DEPRECATED Path get_user_data_dir(const std::string &appname); -/// Returns a directory containing system-wide configuration -Path get_sys_conf_dir(const std::string &argv0); +/// Returns a directory suitable for storing user-specific data. +Path get_user_data_dir(); -/// Returns a directory containing immutable system-wide data -Path get_sys_data_dir(const std::string &argv0, const std::string &appname); +/// Deprecated. Use the argument-less version instead. +DEPRECATED Path get_sys_conf_dir(const std::string &argv0); -/// Returns a directory containing system-wide architecture-specific files -Path get_sys_lib_dir(const std::string &argv0, const std::string &appname); +/// Returns a directory containing system-wide configuration. +Path get_sys_conf_dir(); -/// Changes the current working directory -void chdir(const Path &); +/// Deprecated. Use the argument-less version instead. +DEPRECATED Path get_sys_data_dir(const std::string &argv0, const std::string &appname); + +/// Returns a directory containing immutable system-wide data. +Path get_sys_data_dir(); + +/// Deprecated. Use the argument-less version instead. +DEPRECATED Path get_sys_lib_dir(const std::string &argv0, const std::string &appname); + +/// Returns a directory containing system-wide architecture-specific files. +Path get_sys_lib_dir(); + +/** 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 &); + +/** Looks for a file using the PATH environment variable. */ +Path path_lookup(const std::string &); } // namespace FS } // namespace Msp