Read file from FTP to memory in C#

前端 未结 9 1494
长发绾君心
长发绾君心 2020-12-03 05:15

I want to read a file from a FTP server without downloading it to a local file. I wrote a function but it does not work:

private string GetServerVersion()
{
         


        
9条回答
  •  暖寄归人
    2020-12-03 05:52

    I know this is an old question, but I thought I'd suggest using path.combine for the next guy reading this. Helps clean up these kinds of issues.

            string url = Path.Combine("ftp://ftp.microsoft.com/developr/fortran", "README.TXT");
    

提交回复
热议问题