[−][src]Trait ftp_cmd_list_parse::FtpEntryInfo
All fields that supports both servers: Unix & MSDOS
Required methods
pub fn kind(&self) -> FtpEntryKind
[src]
Represents type of the entry: directory, file, symlink or other.
pub fn name(&self) -> &str
[src]
Returns name of the entry.
pub fn size(&self) -> usize
[src]
Returns size of the entry.
pub fn date_str(&self) -> &str
[src]
Returns date of the entry.
Provided methods
pub fn new(string: &str) -> Option<Self> where
Self: TryFrom<&'a str>,
[src]
Self: TryFrom<&'a str>,
Returns a new FtpEntry
by given string if parsing was successful.
Also you can create new FtpEntry
by use TryFrom
trait.
let ftp_response = "drwxr-xr-x 10 root root 4096 Dec 21 2012 usr"; match FtpEntry::new(ftp_response) { Some(ftp_entry) => { assert_eq!(ftp_entry.name(), "usr"); assert_eq!(ftp_entry.size(), 4096); assert_eq!(ftp_entry.date_str(), "Dec 21 2012"); } None => println!("ftp_response is not valid ftp-entry!") }