libqi-api  2.0.6.8
qi::path

Provide access to application's path, this include configuration, data, executable and library paths.
See qi::path Developer Guide for a global overview of path related functions
. More...

Provide access to application's path, this include configuration, data, executable and library paths.
See qi::path Developer Guide for a global overview of path related functions
.

Provide access to various path including:

Since this library is cross-platform we need to take care of different charsets and localizations (UTF-8, UTF-16).

To support internationalization we will always consider path to be encoded in UTF-8 under Windows. We will convert them to UTF-16 to pass them to the native windows API. On Posix platform we have nothing to do.

We recommand to use boost::filesystem::path with and imbued UTF-8 locale. you could use this code in your main to initialise boost::filesystem locale once:

  // create a locale with a unicode facet to convert between char(utf-8) and wchar(utf-16/utf-32)
  std::locale loc(std::locale(), &qi::unicodeFacet());
  // Make boost.filesystem always use the unicode facet
  boost::filesystem::path::imbue(loc);

  // it's although possible to set the locale as global.
  // This will enable UTF8 supportfor iostream.
  std::locale::global(loc);
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines