pub struct DirEntry {
dir: Arc<InnerReadDir>,
entry: dirent64_min,
name: CString,
}
Available on
target_os=aix
or Android or FreeBSD or Fuchsia or target_os=hurd
or illumos or Linux or target_os=nto
or Redox or Solaris or target_os=vita
only.Fields§
§dir: Arc<InnerReadDir>
§entry: dirent64_min
§name: CString
Implementations§
Source§impl DirEntry
impl DirEntry
pub fn path(&self) -> PathBuf
pub fn file_name(&self) -> OsString
pub fn metadata(&self) -> Result<FileAttr>
Available on (Linux and non-musl, or Android, or Fuchsia, or
target_os=hurd
, or illumos) and non-miri
only.pub fn file_type(&self) -> Result<FileType>
Available on neither Solaris nor illumos nor Haiku nor
target_os=vxworks
nor target_os=aix
nor target_os=nto
nor target_os=vita
.pub fn ino(&self) -> u64
Available on
target_os=aix
or Android or Cygwin or Emscripten or target_os=espidf
or FreeBSD or Fuchsia or Haiku or target_os=horizon
or target_os=hurd
or illumos or L4Re or Linux or target_os=nto
or Redox or target_os=rtems
or Solaris or target_os=vita
or target_os=vxworks
or Apple only.fn name_bytes(&self) -> &[u8] ⓘ
Available on neither NetBSD nor OpenBSD nor DragonFly BSD nor Apple.
fn name_cstr(&self) -> &CStr
Available on Android or FreeBSD or Linux or Solaris or illumos or Fuchsia or Redox or
target_os=aix
or target_os=nto
or target_os=vita
or target_os=hurd
only.pub fn file_name_os_str(&self) -> &OsStr
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DirEntry
impl RefUnwindSafe for DirEntry
impl Send for DirEntry
impl Sync for DirEntry
impl Unpin for DirEntry
impl UnwindSafe for DirEntry
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
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)] const IS_ZST: bool = _
#[doc(hidden)] const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const LAYOUT: Layout = _
#[doc(hidden)] const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const MAX_SLICE_LEN: usize = _
#[doc(hidden)] const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)The largest safe length for a
[Self]
. Read more