The excellent HTML5rocks website for file handling
To read the contents of a directory, create a DirectoryReader and call its readEntries() method. There is no guarantee that all of a directory's entries will be returned in a single call to readEntries(). That means you need to keep calling DirectoryReader.readEntries() until no more results are returned.
I read that to mean that a DirectoryReader
is a one off object. Once you have read it you will get no more data from it. So instead of getting a new file system reference try creating a new DirectoryReader
.