| 268 | } |
| 269 | |
| 270 | int FTPClientWrapperSSL::SendFile(const TCHAR * localfile, const char * ftpfile) { |
| 271 | |
| 272 | m_client.SetCurrentTotal(-1); |
| 273 | HANDLE hFile = ::CreateFile(localfile, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); |
| 274 | if (hFile != INVALID_HANDLE_VALUE) { |
| 275 | DWORD lowsize = ::GetFileSize(hFile, NULL); |
| 276 | |
| 277 | m_client.SetCurrentTotal((long)lowsize); |
| 278 | CloseHandle(hFile); |
| 279 | } |
| 280 | |
| 281 | int retcode = m_client.SendFile(localfile, ftpfile); |
| 282 | |
| 283 | return OnReturn((retcode == UTE_SUCCESS)?0:-1); |
| 284 | } |
| 285 | |
| 286 | int FTPClientWrapperSSL::ReceiveFile(const TCHAR * localfile, const char * ftpfile) { |
| 287 | int res = PU::CreateLocalDirFile(localfile); |
no test coverage detected