try {
String root = Environment.getExternalStorageDirectory().toString();
File myDir = new File(root + "/yourDirectory");
if (!myDir.exists()) {
myDir.mkdirs();
}
//myDir = new File(myDir, caminho);
FileOutputStream out = null;
verifyStoragePermissions(AtividadePrincipal.this);
out = new FileOutputStream(myDir);