For example, in the method list,
both path and useCompression are optional,
but when I invoke the method by
ftp.list(void (0), true, ()=> {}),
it fetches the list of directory 'undefined', instead, Ithink that
it should fetch the current working directory list.
I met this problem when I use typescript,
since the param callback is the last one and is necessary,
I couldn't find a better way to handle it.
If I place the callback in the first,
then it breaks the node-style callback
This is my code
For example, in the method
list
, bothpath
anduseCompression
are optional, but when I invoke the method byftp.list(void (0), true, ()=> {})
, it fetches the list of directory 'undefined', instead, Ithink that it should fetch the current working directory list.I met this problem when I use typescript, since the param callback is the last one and is necessary, I couldn't find a better way to handle it.
If I place the callback in the first, then it breaks the node-style callback This is my code
If I invoke it by
readdir(true, ()=> {})
It fetched the directoryundefined
How can I solve this problem?
Please help me, thanks a lot