ssh2-streams
ssh2-streams copied to clipboard
readdir(handle, callback) doesn't seem to give list==false at end of listing
As per the documentation, readdir
callback should receive a boolean false as the list
argument when the folder listing is over, but I don't see it and my code breaks with EOF.
~~I've tried giving a look at sftp.js and it seems to me that on EOF the cb receives and empty array~~ (see my other comment).
I'm using version 0.1.20, got with ssh2 0.5.5
What are you passing as the first argument to readdir()
? A path string or a directory handle?
A directory handle obtained, with opendir
.
Ugh, forget my comment on sftp.js
, after a closer look I was looking at code inside a
if (typeof where === 'string') {