Check if directory exist on android's sdcard

前端 未结 6 714
时光说笑
时光说笑 2020-12-24 05:01

How do I check if a directory exist on the sdcard in android?

6条回答
  •  旧时难觅i
    2020-12-24 05:21

    The following code also works for java files:

    // Create file upload directory if it doesn't exist    
    if (!sdcarddir.exists())
       sdcarddir.mkdir();
    

提交回复
热议问题