1

最近使用 c# 通过 ftp 修改目录时如何获取

我试过这个,没有运气

FtpWebRequest ftpRequest = (FtpWebRequest)WebRequest.Create(new Uri("ftp://" + ftpAddress + "/" + "public_html" + "/" + this.Url)); 
ftpRequest.Credentials = new NetworkCredential(FTPUsername, FTPPassword); 
ftpRequest.Method = WebRequestMethods.Ftp.GetDateTimestamp; 
DateTime FtpFileLastModified = ((FtpWebResponse)ftpRequest.GetResponse()).LastModified; 
return FtpFileLastModified;
4

0 回答 0