All Projects → sparkeh9 → CoreFTP

sparkeh9 / CoreFTP

Licence: MIT license
An FTP library written in C# with no external dependencies

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to CoreFTP

net-EmailAddress
Multiple implementations on email address validation.
Stars: ✭ 12 (-87.88%)
Mutual labels:  nuget
simple-datagridview-paging
A simple UserControl that shows the data-table and paging automatically with .Net Framework
Stars: ✭ 23 (-76.77%)
Mutual labels:  nuget
Xamarin.AzureCommunicationCalling
Xamarin iOS and Android binding libraries for Microsofts Azure Communication Services
Stars: ✭ 32 (-67.68%)
Mutual labels:  nuget
paket-lock-diff
This is a tool to analyze two paket.lock files showing additions, removals, upgrades and downgrades.
Stars: ✭ 16 (-83.84%)
Mutual labels:  nuget
TfsCmdlets
PowerShell Cmdlets for Azure DevOps and Team Foundation Server
Stars: ✭ 75 (-24.24%)
Mutual labels:  nuget
X.Web.Sitemap
Simple sitemap generator for .NET
Stars: ✭ 66 (-33.33%)
Mutual labels:  nuget
Translit
C# library for cyrillic-latin transliteration (support only slavik languages) by GOST 7.79-2000 (ISO 9).
Stars: ✭ 47 (-52.53%)
Mutual labels:  nuget
VersionTrackingPlugin
Version Tracking Plugin for Xamarin and Windows
Stars: ✭ 62 (-37.37%)
Mutual labels:  nuget
YaccLexTools
This package includes GPPG and GPLEX tools for compiling YACC and LEX source files in your C# project.
Stars: ✭ 16 (-83.84%)
Mutual labels:  nuget
xamarin-bugly
A bugly SDK for Xamarin Android Bindings
Stars: ✭ 22 (-77.78%)
Mutual labels:  nuget
Ubiety.Xmpp.Core
XMPP library for .NET Core
Stars: ✭ 32 (-67.68%)
Mutual labels:  nuget
HashDepot
.NET library for xxHash, FNV, MurmurHash3 and SipHash algorithms
Stars: ✭ 107 (+8.08%)
Mutual labels:  nuget
gauge-csharp
Csharp runner for Gauge
Stars: ✭ 34 (-65.66%)
Mutual labels:  nuget
GW2.NET
A user friendly wrapper around the official GW2 API
Stars: ✭ 18 (-81.82%)
Mutual labels:  nuget
TimeSpan2
Library extending the .NET TimeSpan structure to be comparable, serializable, and convertible, and to support localized string formatting and parsing.
Stars: ✭ 20 (-79.8%)
Mutual labels:  nuget
Standard-Toolkit
An update to Component factory's krypton toolkit to support .NET Framework 4.6.2 - 4.8.1 to .NET Core/.NET
Stars: ✭ 194 (+95.96%)
Mutual labels:  nuget
msbuild-tailwindcss
Adds a build action to process stylesheets through postcss/tailwind
Stars: ✭ 56 (-43.43%)
Mutual labels:  nuget
nexus-repository-import-scripts
A few scripts for importing artifacts into Nexus Repository
Stars: ✭ 142 (+43.43%)
Mutual labels:  nuget
Elysium-Extra
Elysium Extra is a library that implements Metro style for Windows Presentation Foundation (WPF) applications. This Project is a very large add-on project built on top of the Elysium SDK.
Stars: ✭ 65 (-34.34%)
Mutual labels:  nuget
WatsonWebsocket
A simple C# async websocket server and client for reliable transmission and receipt of data
Stars: ✭ 158 (+59.6%)
Mutual labels:  nuget

CoreFTP

NuGet Build Status: Windows

CoreFTP is a simple .NET FTP library written entirely in C#, it is targeted at netstandard 1.6, meaning it will run under .NET Core (which is also where it derives its name) and the full .NET framework. This package was inspired due to a lack of packages providing FTP functionality compiled with support for the netstandard API surface.

NuGet page is at: https://www.nuget.org/packages/CoreFtp/

.NET Framework compatability

CoreFTP Supports and includes compiled binaries for:

  • NetStandard 1.6 and above
  • .NET Framework 4.5.2 and above

Usage

Usage of this small library was intended to be as simple as possible. The integration test suite provides various example of basic FTP usage.

Connecting to an FTP/S server

Connecting to FTP/s supports both Explicit and Implicit modes.

using ( var ftpClient = new FtpClient( new FtpClientConfiguration
                                             {
                                                 Host = "localhost",
                                                 Username = "user",
                                                 Password = "password",
                                                 Port = 990,
                                                 EncryptionType = FtpEncryption.Implicit,
                                                 IgnoreCertificateErrors = true
                                             } ) )
{
    await ftpClient.LoginAsync();
}

Downloading a file to a filestream on local disk

using ( var ftpClient = new FtpClient( new FtpClientConfiguration
                                             {
                                                 Host = "localhost",
                                                 Username = "user",
                                                 Password = "password"
                                             } ) )
{
	var tempFile = new FileInfo( "C:\\test.png" );
    await ftpClient.LoginAsync();
    using ( var ftpReadStream = await ftpClient.OpenFileReadStreamAsync( "test.png" ) )
    {
        using ( var fileWriteStream = tempFile.OpenWrite() )
        {
            await ftpReadStream.CopyToAsync( fileWriteStream );
        }
    }
}

Uploading from a local filestream to the FTP server

using ( var ftpClient = new FtpClient( new FtpClientConfiguration
                                    {
                                        Host = "localhost",
                                        Username = "user",
                                        Password = "password"
                                    } ) )
{
	var fileinfo = new FileInfo( "C:\\test.png" );
    await ftpClient.LoginAsync();    

    using ( var writeStream = await ftpClient.OpenFileWriteStreamAsync( "test.png" ) )
    {
        var fileReadStream = fileinfo.OpenRead();
        await fileReadStream.CopyToAsync( writeStream );
    }
}

Integration Tests

Integration tests can be run against most FTP servers with passive mode enabled, credentials can be configured in appsettings.json of CoreFtp.Tests.Integration.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].