Logo Search packages:      
Sourcecode: camstream version File versions  Download package

void CFTPClient::Upload ( const QString &  local_file,
const QString &  remote_file = QString::null 
)

Upload file to remote site.

Parameters:
local_file The filename on the local machine
remote_file The filename on the remote machine; if not present, the same as local_file

Definition at line 1079 of file FTPClient.cc.

References Send(), SetState(), SetupDataActive(), SetupLocal(), and stFailed.

{
   if (SetupLocal(local_file, false) < 0) {
     SetState(stFailed, 800);
     return;
   }

   if (remote_file.isNull())
     RemoteFileName = local_file;
   else
     RemoteFileName = remote_file;

   CurrentCommand = cmdUpload;
   Direction = TRUE;
   if (m_Passive) {
     outputbuffer = "PASV\r\n";
     Send(); // That's all. We await the 227 response
   }
   else {
     if (SetupDataActive() < 0) {
       qDebug("CFTPClient::Upload() SetupData() failed:.");
       SetState(stFailed);
       CurrentCommand = cmdNop;
     }
   }
}


Generated by  Doxygen 1.6.0   Back to index