PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Existence and availability
  • Managing the files and their location
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
Returns the path of directory that will be used to store files in the external storage space of Android device.
Example
// Save a photo in the application directory
// on the primary external storage space of application
sPhoto is string = VideoStartApp(viPictureCapture)
IF sPhoto <> "" _AND_ SysStatusExternalStorage(i) = sseAvailable THEN
fCopyFile(sPhoto, SysDirExternalStorage(1, sseAppPhoto))
END
Syntax
<Result> = SysDirExternalStorage(<Subscript> , <Type>)
<Result>: Character string
  • Path of specified 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.
<Type>: Integer constant
Path of directory for which the path on the external storage space is sought. This parameter can correspond to one of the following constants:
sseAppDocumentDirectory of application documents.
sseAppFileDirectory of files specific to the application.
sseAppMusicDirectory of musical files of application.
sseAppPhotoDirectory of application photos.
sseAppDownloadDirectory of files downloaded by the application.
sseAppVideoDirectory of application videos.
ssePublicRoot directory of external storage space.
ssePublicDocumentDirectory of shared documents.
ssePublicMusicDirectory of shared musical files.
ssePublicPhotoDirectory of shared photos.
ssePublicDownloadDirectory of shared downloaded files.
ssePublicVideoDirectory of shared videos.
Remarks

Existence and availability

  • The directory corresponding to the path returned by SysDirExternalStorage may not exist. You must check its existence with fDirExist and/or create it with fMakeDir.
  • Before accessing a directory found in the external storage area of device, we advise you to check its availability with SysStatusExternalStorage.

Managing the files and their location

  • 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.
  • When uninstalling the application, the files that group the following characteristics will be automatically deleted by the system:
    • The files found in the application directory on the external storage space
    • the files corresponding to the sseAppFile, sseAppMusic, sseAppVideo, sseAppPhoto, seeAppDownload and sseAppDocument constants.
  • The shared files of the external storage space correspondin to the ssePublic, ssePublicVideo, ssePublicMusic , ssePublicPhoto, ssePublicDocument and ssePublicDownload constants are regularly scanned by the system to be listed. Then, the photos for example are displayed in the albums of the device. These files will not be deleted when uninstalling the application.
  • The files found on the external storage space are accessible in read/write by all the applications.
    From Android 4.4 (KitKat), if the external storage space corresponds to moveable memory (SDCard), the applications can create, modify or delete files in their own directory only (directories corresponding to the sseAppXXX constants). The other files found in the external storage space are accessible in read-only.
Components
Android wd230android.jar
Minimum required version
  • Version 21
Comments
Click [Add] to post a comment