Hello,
The first is the relatively closed iOS, regarding this feature, iOS does not support you for security reasons.
In iOS, your app creates its own folders and you can only write files to those folders. Please refer to Application directories.
When your application is installed on a device, the operating system creates a home directory for your application, and creates a number of directories within the application root directory that are available for use. Since iOS 8, the user-accessible directories are NOT located within the application root, so you can't derive the paths for the application bundle from the user directories, or vice versa.
For the more open Android system, in fact, after Android 11, the storage mechanism has also been modified similar to iOS. Please refer to Storage updates in Android 11.
Starting in Android 11, apps cannot create their own app-specific directory on external storage. To access the directory that the system provides for your app, call
getExternalFilesDirs()
.
Therefore, it is recommended that you store files in an application-specific folder, which is easier to manage and the amount of code will be much reduced.
Please refer to File system helpers to get more details.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.