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
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl !Send for Metadata
impl !Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more