Struct obnth::Metadata [−][src]
Represents metadata information about a file. Similar to std::fs::Metadata
.
Implementations
impl Metadata
[src]
pub fn file_type(&self) -> FileType
[src]
Get the type of this file.
pub fn stat(&self) -> &stat
[src]
Returns a reference to the underlying libc::stat
structure.
pub fn is_file(&self) -> bool
[src]
Returns true
if this Metadata
object refers to a regular file; false
if it does not.
pub fn is_dir(&self) -> bool
[src]
Returns true
if this Metadata
object refers to a regular directory; false
if it does
not.
pub fn permissions(&self) -> Permissions
[src]
Get the permissions of this file.
pub fn len(&self) -> u64
[src]
Get the size of this file.
pub fn dev(&self) -> u64
[src]
Return the ID of the device containing the file.
pub fn ino(&self) -> u64
[src]
Return the file's inode number
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Metadata
[src]
impl Send for Metadata
[src]
impl Sync for Metadata
[src]
impl Unpin for Metadata
[src]
impl UnwindSafe for Metadata
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,