TuttleOFX
1
|
Namespaces | |
namespace | details |
namespace | formatters |
Data Structures | |
class | Color |
Functions | |
boost::filesystem::path | applicationFilepath (const std::string &argv0, const boost::filesystem::path ¤tPath) |
boost::filesystem::path tuttle::common::applicationFilepath | ( | const std::string & | argv0, |
const boost::filesystem::path & | currentPath | ||
) |
Returns the directory that contains the application executable.
On Mac OS X this will point to the directory actually containing the executable, which may be inside of an application bundle (if the application is bundled).
{/proc}
file system. If that fails, it assumes that {argv
[0]} contains the absolute file name of the executable. The function also assumes that the current directory has not been changed by the application.In Symbian this function will return the application private directory, not the path to executable itself, as those are always in {/sys/bin}
. If the application is in a read only drive, i.e. ROM, then the private path on the system drive will be returned.
Definition at line 56 of file applicationPath.cpp.
References DIRLIST_SEP_CHARS, DIRSEP, and OFX::memory::free().
Referenced by main().