function h = ftp(host, varargin)
%FTP Create an FTP object.
%   FTP(host, username, password) returns an FTP object.  If only a host is
%   specified, it defaults to "anonymous" login.
%
%   An alternate port can be specified by separating it from the host name
%   with a colon.  For example: ftp('ftp.mathworks.com:34')
%
%   Name-Value Pairs:
%   -----------------------------------------------------------------------
%
%   "LocalDataConnectionMethod" - Set the current data connection mode.
%
%   "ServerLocale"              - The locale used to interpret the date
%                                 field in the output of dir.
%
%   "Mode"                      - Transfer mode for mget and mput,
%                                 specified as "binary" or "ascii".
%
%   "System"                    - Type of OS running on the FTP server,
%                                 specified as "unix" or "Windows".
%
%   "DirParserFcn"              - Customize the parsing of the dir string
%                                 listings into a struct array.
%
%   FTP Methods:
%   -----------------------------------------------------------------------
%
%   ascii  - Set FTP transfer mode to ASCII
%   binary - Set FTP transfer mode to binary
%   cd     - Change or view current folder on FTP server
%   close  - Close connection to FTP server
%   delete - Delete file on FTP server
%   dir    - List folder contents on FTP server
%   mget   - Download files from FTP server
%   mkdir  - Make new folder on FTP server
%   mput   - Upload file or folder to FTP server
%   rename - Rename file on FTP server
%   rmdir  - Remove folder on FTP server
%
%   FTP Properties:
%   -----------------------------------------------------------------------
%
%   Host                      - Name of FTP server
%   Username                  - Name of authorized account
%   Port                      - Port used to connect to FTP server
%   ServerLocale              - Locale for reading dates from FTP server
%   DirParserFcn              - How to parse the output of FTP server's
%                               LIST command
%   Mode                      - Transfer mode for FTP server
%   LocalDataConnectionMethod - Curent data connection mode. It can have
%                               either of the following values:
%                                 'active'  User machine establishes a
%                                           channel for commands, but FTP
%                                           server establishes a channel
%                                           for data.
%                                 'passive' User machine establishes both
%                                           channels.
%   RemoteWorkingDirectory    - Current working directory on FTP server

%   Copyright 1984-2021 The MathWorks, Inc.

    if feature("FTPV2")
        h = matlab.io.ftp.FTP(host, varargin{:});
    else
        h = matlab.io.internal.ftp.FTP(host, varargin{:});
    end
end
