mirror of
https://github.com/BurntSushi/walkdir.git
synced 2025-09-28 06:00:32 +00:00
parent
107750f24e
commit
9d55d29fcb
16
src/lib.rs
16
src/lib.rs
@ -962,13 +962,6 @@ impl DirEntry {
|
||||
self.depth
|
||||
}
|
||||
|
||||
/// Returns the underlying `d_ino` field in the contained `dirent`
|
||||
/// structure.
|
||||
#[cfg(unix)]
|
||||
pub fn ino(&self) -> u64 {
|
||||
self.ino
|
||||
}
|
||||
|
||||
#[cfg(not(unix))]
|
||||
fn from_entry(depth: usize, ent: &fs::DirEntry) -> Result<DirEntry> {
|
||||
let ty = try!(ent.file_type().map_err(|err| {
|
||||
@ -1028,6 +1021,15 @@ impl DirEntry {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
impl std::os::unix::fs::DirEntryExt for DirEntry {
|
||||
/// Returns the underlying `d_ino` field in the contained `dirent`
|
||||
/// structure.
|
||||
fn ino(&self) -> u64 {
|
||||
self.ino
|
||||
}
|
||||
}
|
||||
|
||||
impl Clone for DirEntry {
|
||||
#[cfg(not(unix))]
|
||||
fn clone(&self) -> DirEntry {
|
||||
|
Loading…
x
Reference in New Issue
Block a user