How to create a file in an SDCARD directory

后端 未结 5 1899
长情又很酷
长情又很酷 2020-12-10 07:38

I want to create a file(not created) in a directory(not created) in the SDCARD. How doing it ?

Thank you.

5条回答
  •  温柔的废话
    2020-12-10 08:12

    The problem is that mkdirs() is called on a File object containing the whole path up to the actual file. It should be called on a File object containing the Path (the directory) and only that. Then you should use another File object to create the actual file.

提交回复
热议问题