PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
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
Started by NernakinBandhoo, Nov., 28 2022 8:58 AM - 2 replies
Connect yourself…
NernakinBandhoo
#1
Registered member
3 messages
Posted on November, 28 2022 - 8:58 AM
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 ?
Report
0
0
NernakinBandhoo
#2
Registered member
3 messages
Posted on December, 26 2022 - 12:42 PM
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.
Report
0
0
Eden Wheeler
#3
Posted on March, 03 2023 - 1:25 PM
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
Report
0
0
→ Go back to WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text