An FTP and FTPS client for .NET & .NET Standard, optimized for speed. Provides extensive FTP commands, File uploads/downloads, SSL/TLS connections, Automatic directory listing parsing, File hashing/checksums, File permissions/CHMOD, FTP proxies, FXP support, UTF-8 support, Async/await support, Powershell support and more. Written entirely in C#.
Major release with lots of new and exciting features, and numerous fixes by our contributors. Thanks everyone!
GetListing
will manually recurse through directories if FtpListOption.Recursive
is set and server does not support recursionLastReply
property which returns the last FtpReply
recieved from the server.AppendNoCheck
to append to a file on the server without checking if it exists (thanks @everbalovas)UploadFileAsync
based on fixes already implemented in UploadFile
UploadFilesAsync
with errorHandling
deletes the entire directory instead of specific filesUploadFile()
or UploadFiles()
sometimes fails to create the remote directory if it doesn't existDownloadDataType
Binary value ignored on ASCII-configured FTP serversBufferedStream
between SslStream
and NetworkStream
(thanks @Lukazoid)Dispose
method of FTPClient
virtual (thanks @martinbu)OpenPassiveDataStream
/Async()
uses the target FTP host instead of the configured proxy (thanks @rmja)FileExists()
for Xlight FTP Server (thanks @oldpepper)IOException
on Android (thanks @jersiovic)BeginInvoke
calls the callback before the IAsyncResult
is added (thanks @Lukazoid)IFtpClient
NetworkStream
(thanks @iamjay)IFtpClient
(thanks @peterfortuin)ActivePorts
is specified in active FTP mode (thanks @ToniMontana)OperationCanceledException
instead of FtpException
when cancellation is requested (thanks @taoyouh)IFtpClient
inherit from IDisposable
(thanks @repl-andrew-ovens)File.Exists()
to run in UI thread (thanks @taoyouh)NetStream
was not assigned in FtpSocketStream
for .NET Standard in active FTP mode (thanks @ralftar)CurrentDataType
was not set for ASCII transfers in DownloadFileAsync
/UploadFileAsync
(thanks @taoyouh)FtpSocketStream
and FtpDataStream
are not disposed in FtpSocketStream.Dispose
(thanks @taoyouh)UploadFile
& DownloadFile
methods via IProgress
Stream.Position
should not be set in UploadFileInternal
unless supportedUploadFile
, DownloadFile
, UploadFiles
& DownloadFiles
(thanks @artiomchi)FileNotFoundException
with reference System.Console
(thanks @artiomchi)UploadFile
or DownloadFile
(thanks @artiomchi)Stream.Read
(thanks @bgroenks96, @artiomchi, @taoyouh)DownloadFileInternal
not recognizing the download data type
with EnableThreadSafeConnections
(thanks @bgroenks96)IFtpClient
interface to build unit tests upon main FtpClient
class (thanks Kris0)FtpDataStream
reads server reply and closes the underlying stream (thanks Lukazoid)SetModifiedTime
API to change modified date of a server file in local timezone/UTCGetModifiedTime
, allowing for getting dates in UTC/Local timezoneGetModifiedTime
(addition of type argument)GetModifiedTime
and SetModifiedTime
now honor the TimeOffset
property in FtpClient
checkIfFileExists
to OpenRead
, OpenAppend
and OpenWrite
to skip GetFileSize
checkInnerException
is null during a file transfer (upload/download)CreateDirectory
and DirectoryExists
to allow null/blank input path valuesGetFtpDirectoryName
to return correct parent folder of simple folder paths (thanks ww898)Upload, Download, UploadFile(s), DownloadFile(s), GetObjectInfo, DeleteFile, DeleteDirectory, FileExists, DirectoryExists, CreateDirectory, Rename, MoveFile, MoveDirectory, SetFilePermissions, Chmod, GetFilePermissions, GetChmod, GetFileSize, GetModifiedTime, VerifyTransfer, OpenRead, OpenWrite, OpenAppend
PlatformUnsupported
exception (if you need async you are free to contribute a non-blocking version of the methods)GetListing
by reading multiple lines at once (BulkListing property, thanks sierrodc)UploadDataType
and DownloadDataType
in all sync/async cases (thanks rharrisxtheta)NullReferenceException
when arguments are null during FtpTrace.WriteFunc
System.Threading.Thread
for .NET Standard 1.4 version (for UWP)FtpTrace.LogToConsole
and LogToFile
to control logging in .NET core versionPlainTextEncryption
API to support FTPS servers and plain-text FTP firewalls (CCC command)FtpSslStream
)FtpTrace.LogFunctions
)FtpTrace.LogIP
, LogUserName
, LogPassword
)RecursiveList
to control if recursive listing should be usedDeleteDirectory()
Major release with lots of new and exciting features:
force
and fastMode
args are no longer requiredexistsMode
to UploadFile() and UploadFiles() allowing for skip/overwrite and appendAdd high level API for UploadFile()
and DownloadFile()
Support FTP proxies, and many fixes related to those.
Added Serializable attribute to defined Exceptions
Fix DeleteDirectory infinite recursion calls when GetListing
Fix issues with GetListing()
on anonymous login
The is the first release of the FluentFTP library, and the 16th major version of the library since it was started in 2011 by J.P. Trosclair.
This library was originally called System.Net.FtpClient and hosted on CodePlex. Users of the older library will have to replace all instances of import System.Net.FtpClient
to import FluentFTP
.
This version requires .NET Framework 4.0. No other frameworks or libraries are required.