Please support function GetInfo int the ftp like sftp.

0 votes
asked Jul 31, 2017 by lanopk (510 points)

We would appreciate if you use the FTP Client to support functions such as GetInfo in SFTP.

FtpItem item = ftp.GetInfo (filename);

I did manually parsing and getting information using "MLST ".
Expose MLST or MLSD related parsing functions.

Thank you.

Applies to: Rebex FTP/SSL

1 Answer

+1 vote
answered Jul 31, 2017 by Lukas Matyska (40,620 points)
selected Aug 1, 2017 by lanopk
 
Best answer

The GetInfo method is not directly supported in FTP, because "MLST" is not supported by all servers. In that case, we apply a workaround, but it doesn't work for all servers as well.

However, you can issue the GetInfo method in FTP like this:

var iftp = (IFtp)ftp;
var item = iftp.GetInfo("readme.txt", true);
Console.WriteLine("{0} [{1} B] ({2})", item.Name, item.Length, item.LastWriteTime);
commented Aug 1, 2017 by lanopk (510 points)
iftp.getinfo works fine.
Thank you.
...