I'm trying to learn rust by doing a simple project that uploads a file to ftp server for which I need to extract the file name and I am having a hard time doing it the file_name method returns Option where as I need just the exact file name for now somewhat like "thisfile.zip" or "this_file.exe"
code sample:
let ancestors = Path::new(& _file_path).file_name();
println!("File name was {:#?}", ancestors);
output example:
File name was Some(
"devupload.exe",
)