How to write in a file declared in res/raw?

前端 未结 2 1461
自闭症患者
自闭症患者 2021-01-23 16:52

I have a file stored in res/raw, and I would like to know how to wite into that file. I tried getResources but it returns an inputStream.

2条回答
  •  醉梦人生
    2021-01-23 17:24

    Not possible. If you need to copy an asset to the device store the file in the assets directory. Then use the AssetManager to stream in and copy the asset so you can write it to disc or application cache.

提交回复
热议问题