Advertisement
Guest User

Untitled

a guest
Jun 4th, 2016
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1. File firstStorage= Environment.getExternalStorageDirectory();
  2. if(firstStorage==null)
  3.     {
  4.      Toast.makeText(this,"Ничего не найдено",Toast.LENGTH_SHORT).show();
  5.      return result;
  6.      }
  7. else
  8.      result.add(firstStorage.getName() );
  9. String rootStr= firstStorage.getParent();
  10. rootFile=null;
  11. if(rootStr!=null && (rootFile= new File(rootStr) ).exists() && !rootFile.isFile() )
  12.     {
  13.      File rootFiles[]= rootFile.listFiles();
  14.      for(File file : rootFiles)
  15.          ...
  16.      }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement