|
|
|
|
- Managing the external cache directory of application
- Tips for using the external cache directory of application
SysCacheExternalStorage (Function) In french: SysCacheStockageExterne Returns the path of directory that will be used to store the data in cache on the external storage space of application.
// Save a file in cache on the external storage space IF SysStatusExternalStorage(1) = sseAvailable THEN sCacheDir is string = SysCacheExternalStorage(1) IF sCacheDir <> "" THEN fSaveText(sCacheDir + "file.txt", MyString) END END
Syntax
<Result> = SysCacheExternalStorage(<Subscript>)
<Result>: Character string - Path of cache directory,
- Empty string ("") if an error occurred.
<Subscript>: Integer Index of the external storage space to be used (if the device includes several external storage spaces). Remark: SysNbExternalStorage returns the number of external storage spaces found on the device. Remarks Managing the external cache directory of application The data found in this directory will be automatically deleted by the system: - if the system requires additional disk space (from Android 4.2 and only if the directory is found on non-movable memory such as a partition of the internal memory).
- if the user want to delete the data in cache.
- if the application is uninstalled.
Tips for using the external cache directory of application - Before accessing a directory located in the external storage area of the device, it is recommended to check its availability with SysStatusStorageCard.
- The application files that must not be shared with other applications must be stored in the application directory on the internal storage space of the application. The path of the different subdirectories is returned by fCurrentDir, fExeDir, fDataDir and fCacheDir.
- fCacheDir is used to find out the path of the cache directory on the internal memory of the device.
- We advise you to limit the volume of data stored in cache and to delete this data as soon as it is no longer used.
Component: wd280android.jar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|