Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional easy to use path for saving public data #455

Open
bkmgit opened this issue Jul 1, 2024 · 2 comments
Open

Additional easy to use path for saving public data #455

bkmgit opened this issue Jul 1, 2024 · 2 comments

Comments

@bkmgit
Copy link
Contributor

bkmgit commented Jul 1, 2024

There are architecture specific paths to the file system for internal use by an application which are set in system.c. For example on Android the following are defined:

Such a path may also be useful for downloads

If using this is problematic, then implementing some way of allowing the user to search the file system in a GUI and specify where they would like to save a file or open a file would be helpful, but seems more difficult to implement in a cross-platform manner.

@mgorges
Copy link
Contributor

mgorges commented Jul 2, 2024

Correct, as per 212ab34, we now use getExternalFilesDirs as (system-directory), which is also accessible to outside tools; we also expose getFilesDir as (system-appdirectory). The change is not backwards compatible (i.e. required manual migration of files) as the previous location on /sdcard is no longer accessible to us so I know of people who disabled the patch and others who use it depending on what is more important to you - maintaining access to old files or supporting newer versions of Android. The content (system-directory) should be visible to file browsers and adb to you, though, unless we broke something recently.

Finally, sure, we can expose getExternalStoragePublicDirectory easily if that is helpful, but I currently (and in the near future) do not have the capacity to build any new JNI-based file access pieces, so you'd have to submit a pull request for an implementation.

@bkmgit
Copy link
Contributor Author

bkmgit commented Jul 22, 2024

Ok, will make a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants