这是ftpclient这个例子中的一小段程序.用来下载的ftp服务器上选中的文件.
void FtpMainWindow::slotDownload()
{
// if the user pressed the download button
// if files have been selected on the right side (remote filesystem)
QValueList<QUrlInfo> files = rightView->selectedItems();
if ( files.isEmpty() )
return;
// create a list of the URLs which should be downloaded
QStringList lst;
QValueList<QUrlInfo>::Iterator it = files.begin();
for ( ; it != files.end(); ++it )
lst << QUrl( remoteOperator, ( *it ).name() );
// copy the list of selected files to the directory in which the
// localOperator currently is (download)
localOperator.copy( lst, localOperator, FALSE );
}
我想做一个自动更新的程序,所以下载部分是自动完成对的,不需要选择.将这段改了,只留下了
localOperator.copy( QString("
ftp://192.168.10.200/1.c", localOperator, FALSE );
但是下下来的程序只有文件名,没有内容,请问是什么原因?哪里需要修进?