classes/CFTP.cpp
std::uint16_t CFTP::list(const std::string &directoryPath, std::string &listOutput)
    {
        try
        {
            if (!m_connected)
            {
                throw std::logic_error("Already connected to a server.");
            }
            listOutput.clear();
            if (sendTransferMode())
            {
                ftpCommand("LIST " + directoryPath);
                transferOnDataChannel(listOutput);
            }
            return (m_commandStatusCode);
        }
        catch (const std::exception &e)
        {
            throw Exception(e.what());
        }
    }
//
// Produce a directory listing for the file/directory passed in or for the current
// working directory if none is.
//
Produce a directory listing for the file/directory passed in or for the current
working directory if none is.
Produce a directory listing for the file / directory passed in or for the current working directory if none is .
std::uint16_t CFTP::list(const std::string &directoryPath, std::string &listOutput)
    {
        try
        {
            if (!m_connected)
            {
                throw std::logic_error("Already connected to a server.");
            }
            listOutput.clear();
            if (sendTransferMode())
            {
                ftpCommand("LIST " + directoryPath);
                transferOnDataChannel(listOutput);
            }
            return (m_commandStatusCode);
        }
        catch (const std::exception &e)
        {
            throw Exception(e.what());
        }
    }
std :: uint16_t CFTP :: list ( const std :: string & directoryPath , std :: string & listOutput ) { try { if ( ! m_connected ) { throw std :: logic_error ( " " ) ; } listOutput . clear ( ) ; if ( sendTransferMode ( ) ) { ftpCommand ( " " + directoryPath ) ; transferOnDataChannel ( listOutput ) ; } return ( m_commandStatusCode ) ; } catch ( const std :: exception & e ) { throw Exception ( e . what ( ) ) ; } }
Produce a directory listing for the file/directory passed in or for the current
working directory if none is.
Produce a directory listing for the file / directory passed in or for the current working directory if none is .