C# FTP Library

码农软件 · 软件分类 · 网络工具包 · 2019-02-27 22:14:26

软件介绍

这个库基于C#和.Net框架,它很好的包装了WININET.DLL的FTP功能,建立了一种有效的与FTP服务器交互的方式

示例代码:

using (FtpConnection ftp = new FtpConnection("ftpserver", "username", "password"))
{
	
	ftp.Open(); /* Open the FTP connection */
	ftp.Login(); /* Login using previously provided credentials */

	if (ftp.DirectoryExists("/incoming")) /* check that a directory exists */
		ftp.SetCurrentDirectory("/incoming"); /* change current directory */

	if (ftp.FileExists("/incoming/file.txt"))  /* check that a file exists */
		ftp.GetFile("/incoming/file.txt", false); /* download /incoming/file.txt as file.txt to current executing directory, overwrite if it exists */

	//do some processing

	try
	{
		ftp.SetCurrentDirectory("/outgoing");
		ftp.PutFile(@"c:\localfile.txt", "file.txt"); /* upload c:\localfile.txt to the current ftp directory as file.txt */
	}
	catch (FtpException e)
	{
		Console.WriteLine(String.Format("FTP Error: {0} {1}", e.ErrorCode, e.Message));
	}

	foreach(var dir in ftp.GetDirectories("/incoming/processed"))
	{
		Console.WriteLine(dir.Name);
		Console.WriteLine(dir.CreationTime);
		foreach (var file in dir.GetFiles())
		{
			Console.WriteLine(file.Name);
			Console.WriteLine(file.LastAccessTime);
		}
	}
}

本文地址:https://codercto.com/soft/d/281.html

HTML5与CSS3权威指南(上册) (第3版)

HTML5与CSS3权威指南(上册) (第3版)

陆凌牛 / 机械工业出版社 / 2015-9-1 / CNY 89.00

本书是HTML 5与CSS 3领域公认的标杆之作,被读者誉为“系统学习HTML 5与CSS 3的最佳著作”和“Web前端工程师案头必备图书之_”。 前两版累计印刷超过15次,网络书店评论超过8000条,98%以上的评论都是五星级的好评。不仅是HTML 5与CSS 3图书领域当之无愧的领头羊,而且在整个原创计算机图书领域是佼佼者。 第3版首先从技术的角度根据最新的HTML 5和CSS 3......一起来看看 《HTML5与CSS3权威指南(上册) (第3版)》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具