Difference between Application Documents Directory and Support Directory in path_provider?

Viewed 27

I am new to path_provider. I am making a music app and want to download an mp3 file but I don't know which is the right way to download the file within the application.

I want to store the file with application storage so users can not access it directly.

so where i can store it?

final dir = await getApplicationDocumentsDirectory();
final dir2 = await getApplicationSupportDirectory();
print(dir.path);
print(dir2.path);

<---------- Output of path ----------->
/data/user/0/com.oraysa/app_flutter.  
/data/user/0/com.oraysa/files

together with this one more question is how can I access downloaded files ( get info of all downloaded files). how can I find the same file so next time I don't have to download it again, instead just directly load it from storage?

0 Answers
Related