Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ pub struct Dir(RawFd);
pub struct Entry {
name: CString,
file_type: Option<SimpleType>,
ino: libc::ino_t,
}

#[cfg(test)]
Expand Down
5 changes: 5 additions & 0 deletions src/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ impl Entry {
pub fn simple_type(&self) -> Option<SimpleType> {
self.file_type
}
/// Returns the inode number of this entry
pub fn inode(&self) -> libc::ino_t {
self.ino
}
}

#[cfg(any(target_os="linux", target_os="fuchsia"))]
Expand Down Expand Up @@ -136,6 +140,7 @@ impl Iterator for DirIter {
libc::DT_LNK => Some(SimpleType::Symlink),
_ => Some(SimpleType::Other),
},
ino: e.d_ino,
}));
}
}
Expand Down