FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV Mobile 2024
→
Is it guaranteed that getExternalFilesDir() and getFilesDir() are on the same storage device
Is it guaranteed that getExternalFilesDir() and getFilesDir() are on the same storage device
Débuté par NernakinBandhoo, 28 nov. 2022 08:58 - 2 réponses
Connectez-vous…
NernakinBandhoo
#1
Membre enregistré
3 messages
Posté le 28 novembre 2022 - 08:58
I develop an app with PCSOFT Windev CASE. There's an instruction "fRepExe" that is equivalent to getFilesDir.
Instead of that, I have replaced it by a call to java instruction getExternalFilesDir, that permit to see the files from a file manager, for an example or via USB cable on the PC.
My question is : is it sure that getFilesDir reside on the same storage device than getExternalFilesDir ?
For an example, if getFilesDir is on the internal storage, is it sure that getExternalFilesDir is on internal too. If getFilesDir is on the external sdcard, is it sure that getExternalFilesDir too ?
Signaler
0
0
NernakinBandhoo
#2
Membre enregistré
3 messages
Posté le 26 décembre 2022 - 12:42
There are no guarantees regarding the partitions used for getFilesDir() and getExternalFilesDir(). In fact, on Android 1.x/2.x, it was very likely that they would be on different partitions of different media.
Nowadays, it is likely that getFilesDir() and getExternalFilesDir() are on the same partition of the same media, but you should not assume that.
Signaler
0
0
Eden Wheeler
#3
Posté le 03 mars 2023 - 13:25
Hello
According to the official Android documentation, getExternalFilesDir() and getFilesDir() may or may not be on the same storage device, depending on the device's implementation and the user's configuration.
getExternalFilesDir() returns the path to the directory on the primary external storage device where the application can place files that are persistent across reinstalls of the application. This storage may be a removable storage media (such as an SD card) or an internal (non-removable) storage.
getFilesDir() returns the path to the directory on the device's internal storage where the application can place files that are persistent across reinstalls of the application.
So while it is possible for the two directories to be on the same storage device, it is not guaranteed. The actual location of the directories will depend on the specific device and the way the user has configured their storage options.
I hope this will help you.
RPA Developer Certification
Signaler
0
0
→ Revenir à WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte