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

Method NameList

deps/FtpClient/FTPClient.cpp:611–624  ·  view source on GitHub ↗

Gets the directory listing of the FTP server. Sends the NLST 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 the directory. @param[in] fPasv see documentation of CFTPClient::Passive

Source from the content-addressed store, hash-verified

609/// @param[out] vstrFileList Returns a simple list of the files and folders of the specified the directory.
610/// @param[in] fPasv see documentation of CFTPClient::Passive
611bool CFTPClient::NameList(const tstring& strPath, TStringVector& vstrFileList, bool fPasv) const
612{
613 COutputStream outputStream(mc_strEolCharacterSequence, CCommand::NLST().AsString());
614 if( !ExecuteDatachannelCommand(CCommand::NLST(), strPath, CRepresentation(CType::ASCII()), fPasv, 0, outputStream) )
615 return false;
616
617 vstrFileList.clear();
618 tstring strLine;
619 outputStream.SetStartPosition();
620 while( outputStream.GetNextLine(strLine) )
621 vstrFileList.push_back(strPath + strLine.c_str());
622
623 return true;
624}
625
626/// Gets the directory listing of the FTP server. Sends the LIST command to
627/// the FTP server.

Callers

nothing calls this directly

Calls 6

CRepresentationClass · 0.85
AsStringMethod · 0.80
clearMethod · 0.80
SetStartPositionMethod · 0.80
GetNextLineMethod · 0.80
c_strMethod · 0.80

Tested by

no test coverage detected