PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Managing the external cache directory of application
  • Tips for using the external cache directory of application
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
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.
Example
// 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
Subscript of external storage space to use (if the device includes several external storage spaces).
Note: 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-moveable 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 found in the external storage area of device, we advise you 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 application. The path of different sub-directories 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.
Components
Android wd230android.jar
Minimum required version
  • Version 21
Comments
Click [Add] to post a comment