private void createdir()
{
string uri = "ftp://127.0.0.1/test/;
if (!Directory.Exists(uri))
{
FtpWebRequest frequest = (FtpWebRequest)FtpWebRequest.Create(new Uri(uri));
frequest.Credentials = new NetworkCredential(user, pwd);
frequest.Method = WebRequestMethods.Ftp.MakeDirectory;
try
{
FtpWebResponse response = frequest.GetResponse() as FtpWebResponse;
}
catch { }
}
}
本文转自94cool博客园博客,原文链接:http://www.cnblogs.com/94cool/archive/2011/09/03/2164528.html,如需转载请自行联系原作者