(
insecure_ftp_stream: Option<&mut AsyncFtpStream>,
secure_ftp_stream: Option<&mut AsyncNativeTlsFtpStream>,
)
| 387 | } |
| 388 | |
| 389 | async fn disconnect( |
| 390 | insecure_ftp_stream: Option<&mut AsyncFtpStream>, |
| 391 | secure_ftp_stream: Option<&mut AsyncNativeTlsFtpStream>, |
| 392 | ) { |
| 393 | if insecure_ftp_stream.is_some() { |
| 394 | match insecure_ftp_stream.unwrap().quit().await { |
| 395 | Ok(_) => {} |
| 396 | Err(err) => eprintln!("Unable to close FTP connection: {}", err), |
| 397 | } |
| 398 | } else if secure_ftp_stream.is_some() { |
| 399 | match secure_ftp_stream.unwrap().quit().await { |
| 400 | Ok(_) => {} |
| 401 | Err(err) => eprintln!("Unable to close FTPS connection: {}", err), |
| 402 | } |
| 403 | } |
| 404 | } |
| 405 | |
| 406 | async fn change_directory( |
| 407 | insecure_ftp_stream: Option<&mut AsyncFtpStream>, |
no outgoing calls