X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ffs%2Fdir.h;h=e964a2d848ae93fd5875711544898608911a58f3;hp=74d2d2cd6339b0118747779b9c660f03e06361e3;hb=edf916d784e503505ddac2acef6f3e9a72abb0d6;hpb=427991f60b200fe4a6517e6fb1fe1980ab14983b diff --git a/source/fs/dir.h b/source/fs/dir.h index 74d2d2c..e964a2d 100644 --- a/source/fs/dir.h +++ b/source/fs/dir.h @@ -37,23 +37,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 +/// Deprecated. Use the argument-less version instead. Path get_user_data_dir(const std::string &appname); -/// Returns a directory containing system-wide configuration +/// Returns a directory suitable for storing user-specific data. +Path get_user_data_dir(); + +/// Deprecated. Use the argument-less version instead. Path get_sys_conf_dir(const std::string &argv0); -/// Returns a directory containing immutable system-wide data +/// Returns a directory containing system-wide configuration. +Path get_sys_conf_dir(); + +/// Deprecated. Use the argument-less version instead. Path get_sys_data_dir(const std::string &argv0, const std::string &appname); -/// Returns a directory containing system-wide architecture-specific files +/// Returns a directory containing immutable system-wide data. +Path get_sys_data_dir(); + +/// Deprecated. Use the argument-less version instead. Path get_sys_lib_dir(const std::string &argv0, const std::string &appname); -/// Changes the current working directory -void chdir(const Path &); +/// 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