FTP package for U++ 
-------------------

This package provides an easy-to-use interface to the client side of the File Transfer Protocol
as specified in RFC 959, with support for a number of advanced capabilities.
Ftp class supports:

- Time-constrained blocking, and non blocking operation modes.
- Multithreaded file transfers, using worker threads.
- IPv6 connections and NATs, as specified in RFC 2428.
- Ftp over TLS/SSL (FTPS), as specified in RFC 2228.
- Feature negotiation mechanism as specifien in RFC 2389.
- Parsing of UNIX and DOS style directory listings.
- Extending the existing functionality of Ftp class.
- Transfer restart/resume mechanism, as specified in RFC 3959.
- UTF-8 encoded path names.

Reference examples:
-------------------

- FtpGet:           Demonstrates basic FTP file download in blocking mode.
- FtpGetNB:         Demonstrates basic FTP file download in non-blocking mode.
- FtpGetMT:         Demonstrates basic Ftp file download, using a worker thread.
- FtpGUI:           Demonstrates a basic FTP browser with GUI (with upload, download, mkdir, rename, delete commands).
- FtpMultiGetMT:    Demonstrates FTP dir listing and concurrent file transfers, using worker threads.
- FtpOverTLS:       Demonstrates the secure connection capability of FTP package in blocking mode.
- FtpQueryFeatures: Demonstrates the feature query mechanism, as defined in RFC 2389
- FtpRawCommand:    Demonstrates FTP raw command execution in blocking mode.
- FtpConsumerGet:   Demonstrates the usage of a consumer function for Ftp download in blocking mode.
- FtpConsumerGetMT: Demonstrates the usage of a consumer function for Ftp download, using a worker thread.

Note: FtpGUI's interface is inspired by qt's (v4.8) FtpExample. (http://doc.qt.io/archives/qt-4.8/qt-network-qftp-example.html)
       
History:
--------
(21-04-2018):   AsyncConsumerGet() method is added.
                Optional "type" argument added to the ftp url specification.
 
(15-04-2018):   Const correctness.

(05-04-2018):   ConnectionInfo is now properly cleared in SetActiveMode().
                Documentation updated.
                Minor fixes & cosmetics.
                 
(01-04-2018):   MAJOR RELEASE: Ftp package, version 2.0.0
                Necessary API breakage.
                Ftp is redesigned, using an effective, and simple queue-model similar to the SSH package's.             
                Old multithreading code completely ditched in favor of the new AsyncWork based ftp workers.
                This resulted in noticable performance gain, and simplicity.
                Non-blocking mode is finally implemented. Ftp class can do non-blocking calls easily.
                FTPS mode improved. It is now possible to inspect the SSL information after handshake.
                Support for user-defined consumer functions (for incoming data) is added.
                A simple ftp URL scheme is implemented. This scheme replaces (partially) the old Ftp::Request class.
                UTF-8 path name encoding support is added.
                Optional Connect/Login() methods pair added. It is now possible to execute commands before login.
                Ftp::DirEntry now uses pcre to parse listing strings.
                Logging is improved.
                Reference examples are added to the package.

(13-07-2017):   Ftp package, version 1.2.1.
                Transfer restart mechanism fixed. It now properly handles failed or aborted transfer.
(02-06-2017):   REST and APPE commands are implemented. See RFC 3659 for more informations.
                Accordingly, Ftp::Append(), Ftp::Restart(), Ftp::GetRestartPos(), Ftp:Request::Restart(), 
                Ftp::Request::DeleteFailed(), and Ftp::Result::IsRestarted() methods are added. 
                It is now possible to restart a failed transfer.             
(01-06-2017):   GetSize() method is added to Ftp class.
(21-04-2017):   Ftp::Request::UserData() and Ftp::Result::GetUserData() methods are added. 
                These methods allow passing user data/messages through worker threads a convenient way.
                Ftp::Request::Priority() method implemented. This method allows user to pre-set a priority level for given worker thread.
(17-04-2017):   FtpAsyncIO and related helper functions refactored. Ftp threads are limited to max 256 slots per process.
(16-04-2017):   Ftp::DirEntry further refactored. Directory listing parser moved to DirEntry::Parser() function.
                Multithreaded convenience functions now check whether the MT infrastructure is available.
                Accordingly ifdef/define preprocessor commands to check MT are removed.
(15-04-2017):   Ftp::DirEntry now properly handles pathnames with whitespaces.
(14-04-2017):   NAMESPACE_UPP and END_UPP_NAMESPACE macros removed.
                Ftp convenience functions are re-written, using an objective approach. (Sugggested by Klugier)
                As a result, two new helper class added to the package: Ftp::Request and Ftp::Result.
                Ftp:DirEnty refactored.
                Possible race condition in AbortWorker() is fixed.
(12-04-2017):   FTP package, version 1.1 
                GetFeatures() method is added. Thıs method implements the FEAT command. See RFC 2389 for details.
(09-04-2017):   FtpAsyncIO: Data buffer size used by FileStream is set to 5 MB (default was 4k) in order to reduce  disk I/O.
                Ftp[Async]Put/Get methods' parameter list order changed.  
(07-04-2017):   FTP package, version 1.0 
                This version brings concurrent file transfers, using Upp's multithreading infrastructure.
(04-04-2017):   FtpAsyncGet() and FtpAsyncPut() convenience functions are added to the package.
                These helper functions simplify asynchronous file transfers while retaining the flexibility and features of Ftp class.
                Slight API changes for better integration with GUI apps. Ftp::Type (ASCII|BINARY) and Ftp::Mode (PASSIVE|ACTIVE) enums made private.
                (See Get() and Put() documentation for API changes.)
                Documentation updated accordingly.
(02-04-2017):   Fixed Ftp::TransferData(): The server reply for failed transfers is now properly handled.
                Control connection now checks if the socket is open.
(06-03-2017):   Ftp package, version 0.9 
                GetReplyAsXml() method is added. This method simplifies the parsing of FTP protocol messages and internal messages.
(30-01-2017):   From now on FTP package requires at least C++11.
(20-01-2015):   Fixed Active mode IPV6 data connection. Improved FTPS. From now on, Ftp class supports also TLS. (As long as it is supported by U++ Core/SSL package)
(07-01-2015):   Ftp package, version 0.8
                Added basic FTPS (SSL) support. FTPS is limited to passive mode connections and can only be invoked per ftp session (latter is a security measure).
(29-12-2014):   Possible namspace clash fixed (Thanks Klugier!).
(25-12-2014):   Ftp package, version 0.7
                FtpGet() and FtpPut() convenience functions are added to the package. These helper functions simplify ftp transfers while retaining flexibility and features of Ftp class.
(24-12-2014):   Complete rewrite of Ftp class. (API breakage). 
                Ftp class from now on supports IPv6 and adjustable data chunk size. 
                Abort() sequence is refined.
(12-05-2014):   Fixed DecodePath() method and download/upload start marker code 125 is now properly handled.
(08-05-2014):   Added Noop() method. Useful for keeping connections alive.
(07-05-2014):   This is the first public beta.
