# eric5.Helpviewer.Network.FtpReply

Module implementing a network reply class for FTP resources.

### Global Attributes

ftpListPage_html

### Classes

FtpReply | Class implementing a network reply for FTP resources.

### Functions

None

## FtpReply

Class implementing a network reply for FTP resources.

### Derived from

QNetworkReply

### Class Attributes

None

### Class Methods

None

### Methods

FtpReply | Constructor
__cssLinkClass | Private method to generate a link class with an icon.
__dirCallback | Private slot handling the receipt of directory listings.
__doFtpCommands | Private slot doing the sequence of FTP commands to get the requested result.
__doFtpLogin | Private method to do the FTP login with asking for a username and password, if the login fails with an error 530.
__retrCallback | Private slot handling the reception of data.
__setContent | Private method to finish the setup of the data.
__setListContent | Private method to prepare the content for the reader.
abort | Public slot to abort the operation.
bytesAvailable | Public method to determined the bytes available for being read.
isSequential | Public method to check for sequential access.
readData | Public method to retrieve data from the reply object.

### Static Methods

None

#### FtpReply (Constructor)

FtpReply(url, accessHandler, parent=None)

Constructor

url
  requested FTP URL (QUrl)
accessHandler
  reference to the access handler (FtpAccessHandler)
parent
  reference to the parent object (QObject)

#### FtpReply.__cssLinkClass

__cssLinkClass(icon, size=32)

Private method to generate a link class with an icon.

icon
  icon to be included (QIcon)
size
  size of the icon to be generated (integer)

Returns:
  CSS class string (string)

#### FtpReply.__dirCallback

__dirCallback(line)

Private slot handling the receipt of directory listings.

line
  the received line of the directory listing (string)

#### FtpReply.__doFtpCommands

__doFtpCommands()

Private slot doing the sequence of FTP commands to get the requested result.

#### FtpReply.__doFtpLogin

__doFtpLogin(username, password, byAuth=False)

Private method to do the FTP login with asking for a username and password, if the login fails with an error 530.

username
  user name to use for the login (string)
password
  password to use for the login (string)
byAuth
  flag indicating that the login data was provided by an authenticator (boolean)

Returns:
  tuple of two flags indicating a successful login and if the login should be retried (boolean, boolean)

#### FtpReply.__retrCallback

__retrCallback(data)

Private slot handling the reception of data.

data
  data received from the FTP server (bytes)

#### FtpReply.__setContent

__setContent()

Private method to finish the setup of the data.

#### FtpReply.__setListContent

__setListContent()

Private method to prepare the content for the reader.

#### FtpReply.abort

abort()

Public slot to abort the operation.

#### FtpReply.bytesAvailable

bytesAvailable()

Public method to determined the bytes available for being read.

Returns:
  bytes available (integer)

#### FtpReply.isSequential

isSequential()

Public method to check for sequential access.

Returns:
  flag indicating sequential access (boolean)

#### FtpReply.readData

readData(maxlen)

Public method to retrieve data from the reply object.

maxlen
  maximum number of bytes to read (integer)

Returns:
  string containing the data (bytes)

Up