mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 11:31:53 +01:00
Merge pull request #561 from bschramke/develop
Support for XDG Base Directory Specification
This commit is contained in:
@@ -76,7 +76,10 @@ class Util_API Application: public Subsystem
|
||||
/// - application.name: the file name of the application executable
|
||||
/// - application.baseName: the file name (excluding extension) of the application executable
|
||||
/// - application.dir: the path to the directory where the application executable resides
|
||||
/// - application.configDir: the path to the directory where the last configuration file loaded with loadConfiguration() was found.
|
||||
/// - application.configDir: the path to the directory where user specific configuration files of the application should be stored.
|
||||
/// - application.cacheDir: the path to the directory where user specific non-essential data files of the application should be stored.
|
||||
/// - application.dataDir: the path to the directory where user specific data files of the application should be stored.
|
||||
/// - application.tempDir: the path to the directory where user specific temporary files and other file objects of the application should be stored.
|
||||
///
|
||||
/// If loadConfiguration() has never been called, application.configDir will be equal to application.dir.
|
||||
///
|
||||
@@ -371,6 +374,7 @@ private:
|
||||
void getApplicationPath(Poco::Path& path) const;
|
||||
void processOptions();
|
||||
bool findAppConfigFile(const std::string& appName, const std::string& extension, Poco::Path& path) const;
|
||||
bool findAppConfigFile(const Path& basePath, const std::string& appName, const std::string& extension, Poco::Path& path) const;
|
||||
|
||||
typedef Poco::AutoPtr<LayeredConfiguration> ConfigPtr;
|
||||
|
||||
|
||||
@@ -41,7 +41,12 @@ class Util_API SystemConfiguration: public AbstractConfiguration
|
||||
/// of the first Ethernet adapter found on the system.
|
||||
/// - system.currentDir: the current working directory
|
||||
/// - system.homeDir: the user's home directory
|
||||
/// - system.configHomeDir: the base directory relative to which user specific configuration files should be stored
|
||||
/// - system.cacheHomeDir: the base directory relative to which user specific non-essential data files should be stored
|
||||
/// - system.dataHomeDir: the base directory relative to which user specific data files should be stored
|
||||
/// - system.tempHomeDir: the base directory relative to which user-specific temporary files and other file objects should be placed
|
||||
/// - system.tempDir: the system's temporary directory
|
||||
/// - system.configDir: the system's configuration directory
|
||||
/// - system.dateTime: the current UTC date and time, formatted in ISO 8601 format.
|
||||
/// - system.pid: the current process ID.
|
||||
/// - system.env.<NAME>: the environment variable with the given <NAME>.
|
||||
@@ -76,7 +81,12 @@ private:
|
||||
static const std::string NODEID;
|
||||
static const std::string CURRENTDIR;
|
||||
static const std::string HOMEDIR;
|
||||
static const std::string CONFIGHOMEDIR;
|
||||
static const std::string CACHEHOMEDIR;
|
||||
static const std::string DATAHOMEDIR;
|
||||
static const std::string TEMPHOMEDIR;
|
||||
static const std::string TEMPDIR;
|
||||
static const std::string CONFIGDIR;
|
||||
static const std::string DATETIME;
|
||||
#if !defined(POCO_VXWORKS)
|
||||
static const std::string PID;
|
||||
|
||||
Reference in New Issue
Block a user