pub trait DirectoryRead: Sized + Base {
type Regular: RegularRead<FsError = <Self as Base>::FsError>;
type SymbolicLink: SymbolicLinkRead<FsError = <Self as Base>::FsError>;
type Fifo: FifoRead<FsError = <Self as Base>::FsError>;
type CharacterDevice: CharacterDeviceRead<FsError = <Self as Base>::FsError>;
type BlockDevice: BlockDeviceRead<FsError = <Self as Base>::FsError>;
type Socket: SocketRead<FsError = <Self as Base>::FsError>;
// Required method
fn entries(
&self,
) -> Result<Vec<DirectoryEntry<'_, Self>>, Error<Self::FsError>>;
// Provided methods
fn entry(
&self,
name: UnixStr<'_>,
) -> Result<Option<TypeWithFile<Self>>, Error<Self::FsError>> { ... }
fn parent(&self) -> Result<Self, Error<Self::FsError>> { ... }
}Expand description
This type can be used alone for read-only filesystems.
Required Associated Types§
Sourcetype Regular: RegularRead<FsError = <Self as Base>::FsError>
type Regular: RegularRead<FsError = <Self as Base>::FsError>
Type of the regular files in the Filesystem this directory belongs to.
Sourcetype SymbolicLink: SymbolicLinkRead<FsError = <Self as Base>::FsError>
type SymbolicLink: SymbolicLinkRead<FsError = <Self as Base>::FsError>
Type of the symbolic links in the Filesystem this directory belongs to.
Sourcetype Fifo: FifoRead<FsError = <Self as Base>::FsError>
type Fifo: FifoRead<FsError = <Self as Base>::FsError>
Type of the fifo in the Filesystem this directory belongs to.
Sourcetype CharacterDevice: CharacterDeviceRead<FsError = <Self as Base>::FsError>
type CharacterDevice: CharacterDeviceRead<FsError = <Self as Base>::FsError>
Type of the character device in the Filesystem this directory belongs to.
Sourcetype BlockDevice: BlockDeviceRead<FsError = <Self as Base>::FsError>
type BlockDevice: BlockDeviceRead<FsError = <Self as Base>::FsError>
Type of the character device in the Filesystem this directory belongs to.
Sourcetype Socket: SocketRead<FsError = <Self as Base>::FsError>
type Socket: SocketRead<FsError = <Self as Base>::FsError>
Type of the UNIX socket in the Filesystem this directory belongs to.
Required Methods§
Sourcefn entries(&self) -> Result<Vec<DirectoryEntry<'_, Self>>, Error<Self::FsError>>
fn entries(&self) -> Result<Vec<DirectoryEntry<'_, Self>>, Error<Self::FsError>>
Returns the directory entries contained.
No two DirectoryEntry returned can have the same filename.
The result must contain at least the entries . (the current directory) and .. (the parent directory).
§Errors
Returns an Error::IO if the device on which the directory is located could not
be read.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl<Dev: Device> DirectoryRead for efs::fs::ext2::file::Directory<Dev>
Available on crate feature ext2 only.
impl<Dev: Device> DirectoryRead for efs::fs::ext2::file::Directory<Dev>
ext2 only.type BlockDevice = BlockDevice<Dev>
type CharacterDevice = CharacterDevice<Dev>
type Fifo = Fifo<Dev>
type Regular = Regular<Dev>
type Socket = Socket<Dev>
type SymbolicLink = SymbolicLink<Dev>
Source§impl<Dev: Device> DirectoryRead for efs::fs::sfs::file::Directory<Dev>
Available on crate feature sfs only.
impl<Dev: Device> DirectoryRead for efs::fs::sfs::file::Directory<Dev>
sfs only.