×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
0
Language: Java
Posted by: Richard McDonald
Added: Jul 31, 2016 5:55 AM
Views: 25
Tags: android file
  1. File file = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
  2. File storyFile = null;
  3. if (file.isDirectory()) {
  4.     File[] files = file.listFiles();
  5.     for (int i = 0; i < files.length; i++) {
  6.         File f = files[i];
  7.         Log.d(TAG, "Found file: " + f.getName());
  8.         if (f.getName().equals("first_release.afd")) {
  9.             storyFile = f;
  10.         }
  11.     }
  12. }
  13.