Baseflow / flutter_cache_manager

Generic cache manager for flutter
https://baseflow.com
MIT License
740 stars 429 forks source link

Can not find the cached files on device #266

Closed DonAlex1897 closed 3 years ago

DonAlex1897 commented 3 years ago

I am using this code to cache files on my app:

var audioFile = await DefaultCacheManager().getSingleFile('fileUrl');

When I ran the app, the files are being cached. But I can not find the path where the files are cached on the device.

This is the address which I get on debug mode: "/data/user/0/{my_package_name}/cache/libCachedImageData/3a65ece0-5366-11eb-91e0-0f0ba53cd292.mp4"

But there is no such path on my device.

ericel commented 3 years ago

What exactly are you trying to do with the path. The library provides an option to use a key. That key should be what you use to identify the cache. var file = await instance.getSingleFile(url, key: key, headers: headers);

DonAlex1897 commented 3 years ago

What exactly are you trying to do with the path. The library provides an option to use a key. That key should be what you use to identify the cache. var file = await instance.getSingleFile(url, key: key, headers: headers);

I want to physically access the file to see if the user can access it from the file manager.

DonAlex1897 commented 3 years ago

Here is the answer to my question:

https://stackoverflow.com/a/65815034/9953815