Not yet - we will add one in the next release when the IFtp
interface is feature complete. Sorry!
In the meantime, a code like this can be used to initialize IFtp with either FTP or SFTP:
IFtp ftp;
if (UseFtp)
{
// FTP-specific code
Ftp tmpFtp = new Ftp();
ftp = tmpFtp;
tmpFtp.Connect(...);
tmpFtp.Login(...);
}
else if (UseSftp)
{
// SFTP-specific code
Sftp tmpFtp = new Sftp();
ftp = tmpFtp;
tmpFtp.Connect(...);
tmpFtp.Login(...);
}
else
{
throw new MyException(...);
}
// at this point, a code that uses the "ftp" object will work with both FTP and SFTP.
ftp.ChangeDirectory("/upload");
...