Platform folders
4.1.0
|
Functions | |
std::string | getDataHome () |
std::string | getConfigHome () |
std::string | getCacheDir () |
void | appendAdditionalDataDirectories (std::vector< std::string > &homes) |
void | appendAdditionalConfigDirectories (std::vector< std::string > &homes) |
std::string | getDesktopFolder () |
std::string | getDocumentsFolder () |
std::string | getDownloadFolder () |
std::string | getDownloadFolder1 () |
std::string | getPicturesFolder () |
std::string | getPublicFolder () |
std::string | getMusicFolder () |
std::string | getVideoFolder () |
std::string | getSaveGamesFolder1 () |
std::string | getSaveGamesFolder2 () |
The namespace I use for common function. Nothing special about it.
void sago::appendAdditionalConfigDirectories | ( | std::vector< std::string > & | homes | ) |
This will append extra folders that your program should be looking for config files in. This does not normally include the path returned by GetConfigHome(). If you want all the folders you should do something like:
You must apply "/My Program Name/" to all the strings. The string at the lowest index has the highest priority.
homes | A vector that extra folders will be appended to. |
void sago::appendAdditionalDataDirectories | ( | std::vector< std::string > & | homes | ) |
This will append extra folders that your program should be looking for data files in. This does not normally include the path returned by GetDataHome(). If you want all the folders you should do something like:
You must apply "/My Program Name/" to all the strings. The string at the lowest index has the highest priority.
homes | A vector that extra folders will be appended to. |
std::string sago::getCacheDir | ( | ) |
Retrives the base folder for storing cache files. You must add the program name yourself like this:
On Windows this defaults to APPDATALOCAL% On Linux this defaults to ~/.cache but can be configured
std::string sago::getConfigHome | ( | ) |
Retrives the base folder for storing config files. You must add the program name yourself like this:
On Windows this defaults to APPDATA% (Roaming profile) On Linux this defaults to ~/.config but can be configured
std::string sago::getDataHome | ( | ) |
Retrives the base folder for storing data files. You must add the program name yourself like this:
On Windows this defaults to APPDATA% (Roaming profile) On Linux this defaults to ~/.local/share but can be configured
std::string sago::getDesktopFolder | ( | ) |
The folder that represents the desktop. Normally you should try not to use this folder.
std::string sago::getDocumentsFolder | ( | ) |
The folder to store user documents to
std::string sago::getDownloadFolder | ( | ) |
The folder where files are downloaded.
std::string sago::getDownloadFolder1 | ( | ) |
The folder where files are downloaded.
std::string sago::getMusicFolder | ( | ) |
The folder where music is stored
std::string sago::getPicturesFolder | ( | ) |
The folder for storing the user's pictures.
std::string sago::getPublicFolder | ( | ) |
This returns the folder that can be used for sharing files with other users on the same system.
std::string sago::getSaveGamesFolder1 | ( | ) |
A base folder for storing saved games. You must add the program name to it like this:
std::string sago::getSaveGamesFolder2 | ( | ) |
A base folder for storing saved games. You must add the program name to it like this:
std::string sago::getVideoFolder | ( | ) |
The folder where video is stored