I'm not quite sure how to use the filter on the list method of ssh2-sftp-client, my objective was to only list files which include a certain string.
The npm page is not particularly helpful on this.
let data = await sftp.list(
'engine/',
(name: string) => !name.includes('READ')
);
This returns an error, saying that includes is not a function.
Any guidance you guys could provide would be great.
Got it,
Was waiting for a string, when it was an array of objects.
Thanks!