开发者

How to install a file under data/data/myapp/files folder?

I tried to put my file, say like, index.html under assets, but it was converted to a raw binary file with unreadable file name, however, I wanted to have that index.ht开发者_运维问答ml intact deployed under app/files folder, what should I do?

Thanks.


Step #1: Create a File object via new File(getFilesDir(), "index.html")

Step #2: See if the File exists using exists()

Step #3: If the File does not exist, copy it from your assets using standard Java I/O

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜