MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / DownloadFile

Method DownloadFile

deps/FtpClient/FTPClient.cpp:691–702  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

689/// @param[in] repType Representation Type (see documentation of CRepresentation)
690/// @param[in] fPasv see documentation of CFTPClient::Passive
691bool 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).

Callers 1

do_download_fileFunction · 0.80

Calls 8

OpenMethod · 0.80
SeekMethod · 0.80
OnPreReceiveFileMethod · 0.80
OnPostReceiveFileMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
GetLocalStreamNameMethod · 0.45
GetLocalStreamSizeMethod · 0.45

Tested by

no test coverage detected