从缓存Android的下载管理器复制文件

从缓存Android的下载管理器复制文件

问题描述:

如何通过复制下载管理器在内部存储的缓存文件夹中下载的文件。我现在用的FileInputStream,但它通过的permison拒绝。是否有任何选项复制文件

How to copy a file downloaded by download manager in internal storage's cache folder. I am using fileInputStream, but it through's permison denied. Is there any option to copy file

它已经有一段时间有人问,但无论如何,今天早上我找到了答案: 你从缓存文件夹中根本无法复制文件。你可以做的是建立在另一个文件夹中的文件(例如文件夹,你得做getFilesDir()),必要时将其删除! 希望它能帮助, 再见

it has been a while since the question was asked but anyway, I found the answer this morning: You simply can't copy files from you Caches folder. What you can do is to create your file in another folder (Files folder for example, which you get by doing getFilesDir()) and delete it if necessary ! Hope it helps, Bye