从缓存Android的下载管理器复制文件 [英] Android download manager copy file from cache

查看:173
本文介绍了从缓存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

这篇关于从缓存Android的下载管理器复制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆