0 votes
by (1.9k 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
by (70.2k points)
selected by
 
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);
by (1.9k points)
iftp.getinfo works fine.
Thank you.
...