pub struct Metadata { /* private fields */ }Expand description
Represents metadata about a file. libssh returns this in a couple of contexts, and not all fields are used in all contexts.
Implementations§
source§impl Metadata
impl Metadata
pub fn len(&self) -> Option<u64>
pub fn name(&self) -> Option<&str>
sourcepub fn long_name(&self) -> Option<&str>
pub fn long_name(&self) -> Option<&str>
libssh docs say that this is the ls -l output on openssh servers, but is unreliable with other servers
sourcepub fn flags(&self) -> u32
pub fn flags(&self) -> u32
Flags the indicate which attributes are present.
Is a bitmask of SSH_FILEXFER_ATTR_XXX constants
sourcepub fn permissions(&self) -> Option<u32>
pub fn permissions(&self) -> Option<u32>
The unix mode_t permission bits
sourcepub fn accessed(&self) -> Option<SystemTime>
pub fn accessed(&self) -> Option<SystemTime>
The last-accessed time
sourcepub fn created(&self) -> Option<SystemTime>
pub fn created(&self) -> Option<SystemTime>
The file creation time
sourcepub fn modified(&self) -> Option<SystemTime>
pub fn modified(&self) -> Option<SystemTime>
The file modification time