wolfSSL / wolfssh

wolfSSH is a small, fast, portable SSH implementation, including support for SCP and SFTP.
https://www.wolfssl.com
367 stars 88 forks source link

ReadDir Override #691

Closed ejohnstown closed 3 months ago

ejohnstown commented 3 months ago

Make wolfSSH_SFTPNAME_readdir defining SFTP_Name_readdir. It has to be defined as a macro, but it can be defined to expand to its own name if also a function with the same name is defined.

What matters is that it takes 3 arguments:

  1. the filesystem context as first argument
  2. WDIR* as second argument
  3. WS_SFTPNAME* as third argument

On successful execution, it returns WS_SUCCESS and the WSSFTPNAME structure pointed by the third argument will be filled with the relevant info, otherwise a WS* error code is returned.

This supersedes PR #552.