Struct cap_std::fs::FileType[][src]

#[repr(transparent)]pub struct FileType(_);

A structure representing a type of file with accessors for each file type.

This corresponds to std::fs::FileType.

We need to define our own version because the libstd `FileType` doesn't have a public constructor that we can use.

Implementations

impl FileType[src]

pub const fn dir() -> FileType[src]

Creates a FileType for which is_dir() returns true.

pub const fn file() -> FileType[src]

Creates a FileType for which is_file() returns true.

pub const fn unknown() -> FileType[src]

Creates a FileType for which is_unknown() returns true.

pub fn is_dir(&self) -> bool[src]

Tests whether this file type represents a directory.

This corresponds to std::fs::FileType::is_dir.

pub fn is_file(&self) -> bool[src]

Tests whether this file type represents a regular file.

This corresponds to std::fs::FileType::is_file.

Tests whether this file type represents a symbolic link.

This corresponds to std::fs::FileType::is_symlink.

Trait Implementations

impl Clone for FileType[src]

impl Copy for FileType[src]

impl Debug for FileType[src]

impl Eq for FileType[src]

impl FileTypeExt for FileType[src]

impl Hash for FileType[src]

impl PartialEq<FileType> for FileType[src]

impl StructuralEq for FileType[src]

impl StructuralPartialEq for FileType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.