Gets a file from the FTP server. Uses C functions for file access (very fast). @param[in] strRemoteFile Filename of the sourcefile on the FTP server. @param[in] strLocalFile Filename of the target file on the local computer. @param[in] repType Representation Type (see documentation of CRepresentation) @param[in] fPasv see documentation of CFTPClient::Passive
| 689 | /// @param[in] repType Representation Type (see documentation of CRepresentation) |
| 690 | /// @param[in] fPasv see documentation of CFTPClient::Passive |
| 691 | bool CFTPClient::DownloadFile(const tstring& strRemoteFile, const tstring& strLocalFile, const CRepresentation& repType, bool fPasv) const |
| 692 | { |
| 693 | CFile file; |
| 694 | if( !file.Open(strLocalFile, m_fResumeIfPossible?_T("ab"):_T("wb")) ) |
| 695 | { |
| 696 | ReportError(CError::GetErrorDescription(), CCnv::ConvertToTString(__FILE__), __LINE__); |
| 697 | return false; |
| 698 | } |
| 699 | file.Seek(0, CFile::orEnd); |
| 700 | |
| 701 | return DownloadFile(strRemoteFile, file, repType, fPasv); |
| 702 | } |
| 703 | |
| 704 | /// Gets a file from the FTP server. |
| 705 | /// Uses C functions for file access (very fast). |
no test coverage detected