kathawala / expo-file-dl

Download files to any folder and notify the user while the download is happening and when the download finishes
MIT License
44 stars 8 forks source link

Add option to move files from internal memory to the external directories #9

Open kathawala opened 3 years ago

kathawala commented 3 years ago

On Android the path to this is easy to see. What about on iOS? Need to look into that.

Suggested here: https://github.com/kathawala/expo-file-dl-example/issues/7

kathawala commented 3 years ago

This will need to be done alongside the move to SAF in Android R / Expo 4`

rpattcorner commented 3 years ago

Let me put in a good word for a use case for the file:: feature, and an offer to test it when it's done.

My particular app involves a library of music that is stored in JSON format, just a plain old file. Currently it's easy to back up and restore the file, since both operations will happily read the expo-file-system locations.

Ah, but preserving that precious library somewhere outside the phone or importing somebody else's list of favorite tunes. Not so easy. From what I can tell (I'll be joyful if you correct me!), the expo file system is a very walled garden, and no other app can write there; neither can an expo app read another app's space -- even a public space.

Your library seems to fix one of those problems ... if a backup were posted to some kind of file server (think AWS S3), the current expo-file-dl library could write it to the expo file system, where it could be imported with current app functionality. Right?

But often people will want to simply email each other files, or acquire them from another source that delivers the proper format. If the library could import from the overall public space on the phone, instead of a URL requiring a server, these backups, or subsets, could be swapped around in a flexible manner.

Format check is my problem of course.

Do hope you find time for this at some point! Thanks for the library!