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

Method ReceiveFile

src/FTPClientWrapperSSL.cpp:286–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286int FTPClientWrapperSSL::ReceiveFile(const TCHAR * localfile, const char * ftpfile) {
287 int res = PU::CreateLocalDirFile(localfile);
288 if (res == -1)
289 return -1;
290
291 long size = 0;
292 m_client.SetCurrentTotal(-1);
293 int sizeres = m_client.GetSize(ftpfile, &size);
294 if (sizeres == UTE_SUCCESS)
295 m_client.SetCurrentTotal(size);
296
297 int retcode = m_client.ReceiveFile(ftpfile, localfile);
298
299 return OnReturn((retcode == UTE_SUCCESS)?0:-1);
300}
301
302int FTPClientWrapperSSL::SendFile(HANDLE hFile, const char * ftpfile) {
303

Callers 1

PerformMethod · 0.45

Calls 2

SetCurrentTotalMethod · 0.80
GetSizeMethod · 0.45

Tested by

no test coverage detected