Free FTP Library [closed]

2019-01-08 05:32发布

Can you recommend a free FTP library(class) for C#.

The class has to be well written, and have good performance.

标签: c# ftp
7条回答
对你真心纯属浪费
2楼-- · 2019-01-08 06:11

I've just posted an article that presents both an FTP client class and an FTP user control.

They are simple and aren't very fast, but are very easy to use and all source code is included. Just drop the user control onto a form to allow users to navigate FTP directories from your application.

查看更多
老娘就宠你
3楼-- · 2019-01-08 06:14

After lots of investigation in the same issue I found this one to be extremely convenient: https://github.com/flagbug/FlagFtp

For example (try doing this with the standard .net "library" - it will be a real pain) -> Recursively retreving all files on the FTP server:

  public IEnumerable<FtpFileInfo> GetFiles(string server, string user, string password)
    {
        var credentials = new NetworkCredential(user, password);
        var baseUri = new Uri("ftp://" + server + "/");

        var files = new List<FtpFileInfo>();
        AddFilesFromSubdirectory(files, baseUri, credentials);

        return files;
    }

    private void AddFilesFromSubdirectory(List<FtpFileInfo> files, Uri uri, NetworkCredential credentials)
    {
        var client = new FtpClient(credentials);
        var lookedUpFiles = client.GetFiles(uri);
        files.AddRange(lookedUpFiles);

        foreach (var subDirectory in client.GetDirectories(uri))
        {
            AddFilesFromSubdirectory(files, subDirectory.Uri, credentials);
        }
    }
查看更多
干净又极端
4楼-- · 2019-01-08 06:19

edtFTPnet is a free, fast, open source FTP library for .NET, written in C#.

查看更多
The star\"
5楼-- · 2019-01-08 06:21

You may consider FluentFTP, previously known as System.Net.FtpClient.

It is released under The MIT License and available on NuGet (FluentFTP).

查看更多
放我归山
6楼-- · 2019-01-08 06:28

Why don't you use the libraries that come with the .NET framework: http://msdn.microsoft.com/en-us/library/ms229718.aspx

They are designed by Microsoft and should work fairly efficiently.

查看更多
\"骚年 ilove
7楼-- · 2019-01-08 06:30

I like Alex FTPS Client which is written by a Microsoft MVP name Alex Pilotti. It's a C# library you can use in Console apps, Windows Forms, PowerShell, ASP.NET (in any .NET language). If you have a multithreaded app you will have to configure the library to run syncronously, but overall a good client that will most likely get you what you need.

查看更多
登录 后发表回答