0

I am new in android programming. I need to access all file names in a directory, in Java we can use Files.newDirectoryStream(path) in order to do so, but since android doesn't support this what should I use instead?

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
Lara
  • 167
  • 1
  • 1
  • 9

1 Answers1

0

use something along the lines of the following:

File mydir = new File(path);
File[] mydirlist = mydir.listFiles();
MikeT
  • 51,415
  • 16
  • 49
  • 68