readdir method
Reads the items of a directory. Returns an Stream of SftpName chunks. Use listdir instead of this unless the directory contains a large number of items.
Implementation
Stream<List<SftpName>> readdir(String path) async* {
final dir = await _opendir(path);
while (true) {
final names = await _readdir(dir);
if (names == null) break;
yield names;
}
await _close(dir);
}