Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- EditText directoryEditText = findViewById(R.id.directoryEditText);
- String directoryName = directoryEditText.getText().toString();
- File dir = new File(Environment.getExternalStorageDirectory() + "/" + directoryName);
- if(dir.exists() && dir.isDirectory()) {
- Toast.makeText(getApplicationContext(), "existe uma pasta com esse nome", Toast.LENGTH_SHORT).show();
- } else {
- Toast.makeText(getApplicationContext(), "pasta não existe", Toast.LENGTH_SHORT).show();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement