Example 56-1. General usage
|
At first, you need to instantitiate a new System_Folders object. The operating system is determined there, which is needed for all the other methods.
Then just use the getXXX() methods to retrieve the folder locations. Remember that they return NULL if the location can't be determined.
Example 56-2. General usage
|
This example displays the location of the config file (in which the folder settings are stored), shows some folder locations and sets the documents directory to a (probably non-existing) directory and saves the folder locations.
In the next program call, the documents directory is reset to the normal one and saved again.