We are using latest version of SSH.Net library. We are getting null value in the file extension once file is downloaded from the server. Please check below BOLD word "myFile". When we check the properties of this paramter we are gettting null value in the extension parameter.
Please check below code.
IEnumerable<Renci.SshNet.Sftp.SftpFile> myfileList = client3.ListDirectory("/.");
foreach (Renci.SshNet.Sftp.SftpFile myFile in myfileList)
{
if (myFile.Name == "ABC.csv")
{
var mem = File.Create("D:\\temp\\ABC.csv");
var asynch = client3.BeginDownloadFile("/ABC.csv", mem, null, null);
var sftpAsynch = asynch as Renci.SshNet.Sftp.SftpDownloadAsyncResult;
client3.EndDownloadFile(asynch);
}
}