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

Method List

deps/FtpClient/FTPClient.cpp:591–604  ·  view source on GitHub ↗

Gets the directory listing of the FTP server. Sends the LIST command to the FTP server. @param[in] strPath Starting path for the list command. @param[out] vstrFileList Returns a simple list of the files and folders of the specified directory. @param[in] fPasv see documentation of CFTPClient::Passive

Source from the content-addressed store, hash-verified

589/// @param[out] vstrFileList Returns a simple list of the files and folders of the specified directory.
590/// @param[in] fPasv see documentation of CFTPClient::Passive
591bool CFTPClient::List(const tstring& strPath, TStringVector& vstrFileList, bool fPasv) const
592{
593 COutputStream outputStream(mc_strEolCharacterSequence, CCommand::LIST().AsString());
594 if( !ExecuteDatachannelCommand(CCommand::LIST(), strPath, CRepresentation(CType::ASCII()), fPasv, 0, outputStream) )
595 return false;
596
597 vstrFileList.clear();
598 tstring strLine;
599 outputStream.SetStartPosition();
600 while( outputStream.GetNextLine(strLine) )
601 vstrFileList.push_back(strPath + strLine.c_str());
602
603 return true;
604}
605
606/// Gets the directory listing of the FTP server. Sends the NLST command to
607/// the FTP server.

Callers 1

Calls 8

CRepresentationClass · 0.85
AsStringMethod · 0.80
clearMethod · 0.80
SetStartPositionMethod · 0.80
GetNextLineMethod · 0.80
c_strMethod · 0.80
ParseMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected