I want to download all the files of a directory in the server. So, I do:
_ftp->list("myDirectory/");
I connect the signal listInfo, and I implemented the slot like this:
void manageFTP::on_listInfo(QUrlInfo info)
{
if (!info.isDir())
{
QString remoteFile= "remote";
QFile *file = new QFile(info.name());
if (file ->open(QIODevice::ReadWrite))
_ftp->get(remoteFile, file);
}
}
My problem is to know when the download is entirely finished because I don't know how many files are in the directory and I don't know the id of the last get. How can I know and be sure the download has finished?