This FTP server is written as .NET Standard 2.0 library and has an abstract file system which allows e.g. Google Drive as backend.
The library is released under the .
- Visual Studio 2017 / C# 7.2
- Visual Studio 2017
- .NET Standard 2.0
| Description | Badge |
|---|---|
FubarDev.FtpServer: Core library | |
FD.FS.Abstractions: Basic types | |
FD.FS.FileSystem.DotNet: System.IO-based file system | |
FD.FS.FileSystem.GoogleDrive: Google Drive as file system |
dotnet new console
dotnet add package FubarDev.FtpServer.FileSystem.DotNet
dotnet add package FubarDev.FtpServer
dotnet add package Microsoft.Extensions.DependencyInjection// Setup dependency injectionvarservices=newServiceCollection();// use %TEMP%/TestFtpServer as root folderservices.Configure<DotNetFileSystemOptions>(opt =>opt.RootPath=Path.Combine(Path.GetTempPath(),"TestFtpServer"));// Add FTP server services// DotNetFileSystemProvider = Use the .NET file system functionality// AnonymousMembershipProvider = allow only anonymous loginsservices.AddFtpServer(builder =>builder.UseDotNetFileSystem()// Use the .NET file system functionality.EnableAnonymousAuthentication());// allow anonymous logins// Configure the FTP serverservices.Configure<FtpServerOptions>(opt =>opt.ServerAddress="127.0.0.1");// Build the service providerusing(varserviceProvider=services.BuildServiceProvider()){// Initialize the FTP servervarftpServer=serviceProvider.GetRequiredService<IFtpServer>();// Start the FTP serverftpServer.Start();Console.WriteLine("Press ENTER/RETURN to close the test application.");Console.ReadLine();// Stop the FTP serverftpServer.Stop();}