MCPcopy Create free account
hub / github.com/ashkulz/NppFTP / SendFile

Method SendFile

src/FTPClientWrapperSSL.cpp:270–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270int 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
286int FTPClientWrapperSSL::ReceiveFile(const TCHAR * localfile, const char * ftpfile) {
287 int res = PU::CreateLocalDirFile(localfile);

Callers 2

MkFileMethod · 0.45
PerformMethod · 0.45

Calls 1

SetCurrentTotalMethod · 0.80

Tested by

no test coverage detected