From my application, I want to store some images into my SD card. For that I need to create a one folder.
At the first time folder will create but after it checks whether that folder is present or not. How can I do it?
below code will create a directory if it does not exist
File direct = new File(Environment.getExternalStorageDirectory() + "/New Folder");
if(!direct.exists())
{
if(direct.mkdir())
{
//directory is created;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With