Adds a file to the transfer queue.
ANSI (Cross Platform) int QueueFile(const char* lpszLocalFile, const char* lpszRemoteFile); Unicode (Windows) INT QueueFile(LPCWSTR lpszLocalFile, LPCWSTR lpszRemoteFile);
- (void)queueFile:(NSString*)localFile :(NSString*)remoteFile;
#define MID_SFTP_QUEUEFILE 15 IPWORKSSFTP_EXTERNAL int IPWORKSSFTP_CALL IPWorksSFTP_SFTP_Do(void *lpObj, int methid, int cparam, void *param, int cbparam, int64 *lpllVal);
This method adds a file to the queue of files that will be transferred.
It is not required to use this method, however this extends the ability of the class to allow for multiple simultaneous file transfers.
To simply transfer a file without using this method you need only set LocalFile, RemoteFile, and call Upload or Download as appropriate. This method allows you to instead queue multiple files before beginning a transfer.
When a file is queued it will not be transferred until the Upload or Download method is called. If multiple files are queued the files will be transferred simultaneously. The SimultaneousTransferLimit setting controls the maximum number of simultaneous transfers.
The Upload or Download method will not return until the Queue has been completely processed. This method may be called from within events in order to add additional files to the Queue before processing is complete.
To clear the queue call ResetQueue. This will not affect current transfers.
To cancel and individual file transfer set the Cancel parameter of the Transfer event to true. The rest of the queue will continue to process as normal.
The Interrupt method may be called to immediately stop all current transfers.
In the event of a file specific error the Error event will fire and the LocalFile and RemoteFile event parameters can be used to identify the file to which the error applies.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)