pub async fn list(&mut self, path: &str) -> Result<String, crate::error::Error> {
        let mut conn = self.get_data_connection().await?;
        self.write_unary_command_expecting(
            "LIST",
            path,
            vec![
                StatusCodeKind::TransferStarted,
                StatusCodeKind::TransferAboutToStart,
            ],
        )
        .await?;

        let mut buffer = Vec::with_capacity(1024);
        conn.read_to_end(&mut buffer).await?;
        self.parse_reply_expecting(vec![StatusCodeKind::RequestActionCompleted])
            .await?;
        let text = String::from_utf8(buffer).map_err(|_| {
            crate::error::Error::SerializationFailed(
                "Invalid ASCII returned on server directory listing.".to_string(),
            )
        })?;
        Ok(text)
    }
/// List the provided path in any way the server desires.
List the provided path in any way the server desires.
List the provided path in any way the server desires .
pub async fn list(&mut self, path: &str) -> Result<String, crate::error::Error> {
        let mut conn = self.get_data_connection().await?;
        self.write_unary_command_expecting(
            "LIST",
            path,
            vec![
                StatusCodeKind::TransferStarted,
                StatusCodeKind::TransferAboutToStart,
            ],
        )
        .await?;
        let mut buffer = Vec::with_capacity(1024);
        conn.read_to_end(&mut buffer).await?;
        self.parse_reply_expecting(vec![StatusCodeKind::RequestActionCompleted])
            .await?;
        let text = String::from_utf8(buffer).map_err(|_| {
            crate::error::Error::SerializationFailed(
                "Invalid ASCII returned on server directory listing.".to_string(),
            )
        })?;
        Ok(text)
    }
pub async fn list ( & mut self , path : & str ) -> Result < String , crate :: error :: Error > { let mut conn = self . get_data_connection ( ) . await ? ; self . write_unary_command_expecting ( " " , path , vec ! [ StatusCodeKind TransferStarted StatusCodeKind TransferAboutToStart ] , ) . await ? ; let mut buffer = Vec :: with_capacity ( 1024 ) ; conn . read_to_end ( & mut buffer ) . await ? ; self . parse_reply_expecting ( vec ! [ StatusCodeKind RequestActionCompleted ] ) . await ? ; let text = String :: from_utf8 ( buffer ) . map_err ( | _ | { crate :: error :: Error :: SerializationFailed ( " " . to_string ( ) , ) } ) ? ; Ok ( text ) }
List the provided path in any way the server desires.
List the provided path in any way the server desires .
&mut self
path
&str
&mut self
path
&str