Open l15k4 opened 7 years ago
https://github.com/akka/alpakka/blob/master/ftp/src/main/scala/akka/stream/alpakka/ftp/scaladsl/FtpApi.scala#L74 https://github.com/akka/alpakka/blob/master/ftp/src/main/scala/akka/stream/alpakka/ftp/scaladsl/FtpApi.scala#L109
The problem is that when you need to use generics :
def foo[C, S <: RemoteFileSettings](ftpPath: String, ftpApi: FtpApi[C], ftpConf: S)
You'd get error :
overloaded method value ls with alternatives
The reason why people cannot use concrete implementations directly is that usually production FTP servers use SFTP and testing servers use FTP.
This could be achieved by implementing a factory similar to the construct in the FTP tests.
https://github.com/akka/alpakka/blob/master/ftp/src/main/scala/akka/stream/alpakka/ftp/scaladsl/FtpApi.scala#L74 https://github.com/akka/alpakka/blob/master/ftp/src/main/scala/akka/stream/alpakka/ftp/scaladsl/FtpApi.scala#L109
The problem is that when you need to use generics :
You'd get error :
The reason why people cannot use concrete implementations directly is that usually production FTP servers use SFTP and testing servers use FTP.