Вопрос

Instead of QFtp in Qt4.8.2 I am now in the process of porting to QNetworkAccessManager in Qt5.2.1 etc.

I have the following questions:

  1. Is it possible to port QFtp::rawCommand("SITE UMASK 22"); to a solution based on QNetworkAccessManager?

  2. How do I specify transfer type using QNetworkAccessManager? In QFtp it is specified as an argument in e.g. int QFtp::put(QIODevice* dev,const QString& file,TransferType type = Binary)?

  3. Is it possible to port int QFtp::rename(const QString & oldname,const QString & newname) to QNetworkAccessManager?

Looking at Qt code to get list of files from ftp server using QNetworkAccessManager question on Qt 5.0, makes me think that I need to install the compatibility libraries to make the migration.

Это было полезно?

Решение

The QtFtp library is needed as QNetworkAccessManager currently does not support needed functionality. E.g. QNetworkAccessManager only use binary transfer mode. In addition, there is no support for any commands other than get and put.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top