Sample code for 30+ languages & platforms
Rust

FTP FEAT Command

See more FTP Examples

Sends a FEAT command to the FTP server and returns the response. Here is a typical response:
211-Features:
 MDTM
 REST STREAM
 SIZE
 MLST type*;size*;modify*;
 MLSD
 AUTH SSL
 AUTH TLS
 UTF8
 CLNT
 MFMT
211 End

Chilkat Rust Downloads

Rust

// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

let ftp = chilkat::Ftp2::new();

ftp.set_hostname("ftp.example.com");
ftp.set_username("test");
ftp.set_password("test");

// Connect and login to the FTP server.
if ftp.connect().is_err() {
    println!("{}", ftp.last_error_text());
    return;
}

let ftp_response = ftp.feat().unwrap_or_default();

println!("{}", ftp_response);

let _ = ftp.disconnect().is_ok();