The dart:html DirectoryReader doesn't follow the same semantics of the javascript one. So it does return all the entries at once, instead using a marker of length == 0 at the end of a series of calls. I _think_ you could convert this method to:

    return root.createReader().readEntries();