|
|
| AssetsAndroid (FileManager *file_manager) |
| | Assets Android constructor.
|
| |
|
void | init () |
| | A function that detects a path where data directory is placed and that sets some environment variables that are used for finding data and home directory in a common code.
|
| |
|
|
void | extractData () |
| | A function that extracts whole data directory from apk file to a real path in the filesystem.
|
| |
| bool | extractFile (std::string file_name) |
| | A function that extracts selected file or directory from apk file. More...
|
| |
|
void | removeData () |
| | A function that removes whole STK data directory.
|
| |
| bool | hasAssets () |
| | A function that checks if assets are included in the package. More...
|
| |
| void | touchFile (std::string path) |
| | A function that creates empty file. More...
|
| |
| bool | isWritable (std::string path) |
| | Checks if there is write access for selected path. More...
|
| |
| std::string | getPreferredPath (const std::vector< std::string > &paths) |
| | Determines best path for extracting assets, depending on available disk space. More...
|
| |
| void | setProgressBar (int progress) |
| | A function set progress bar using java JNI. More...
|
| |
◆ extractFile()
| bool AssetsAndroid::extractFile |
( |
std::string |
filename | ) |
|
|
private |
A function that extracts selected file or directory from apk file.
- Parameters
-
| dir_name | Directory to extract from assets |
- Returns
- True if successfully extracted
◆ getDataPath()
| std::string AssetsAndroid::getDataPath |
( |
| ) |
|
|
static |
Get a path for internal data directory.
- Returns
- Path for internal data directory or empty string when failed
◆ getPreferredPath()
| std::string AssetsAndroid::getPreferredPath |
( |
const std::vector< std::string > & |
paths | ) |
|
|
private |
Determines best path for extracting assets, depending on available disk space.
- Parameters
-
| paths | A list of paths that should be checked |
- Returns
- Best path or empty string in case of error
◆ hasAssets()
| bool AssetsAndroid::hasAssets |
( |
| ) |
|
|
private |
A function that checks if assets are included in the package.
- Returns
- true if apk has assets
◆ isWritable()
| bool AssetsAndroid::isWritable |
( |
std::string |
path | ) |
|
|
private |
Checks if there is write access for selected path.
- Parameters
-
| path | A path that should be checked |
- Returns
- True if there is write access
◆ setProgressBar()
| void AssetsAndroid::setProgressBar |
( |
int |
progress | ) |
|
|
private |
A function set progress bar using java JNI.
- Parameters
-
◆ touchFile()
| void AssetsAndroid::touchFile |
( |
std::string |
path | ) |
|
|
private |
A function that creates empty file.
- Parameters
-
| path | A path to the file that should be created |
The documentation for this class was generated from the following files: