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 changelog/2718.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add WatchDescriptor::inner_id, to get libc id of WatchDescriptor.
8 changes: 7 additions & 1 deletion src/sys/inotify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ pub struct Inotify {
pub struct WatchDescriptor {
wd: i32,
}
impl WatchDescriptor {
/// Inner WatchDescriptor, from libc.
pub fn inner_id(self) -> i32 {
self.wd
}
}

/// A single inotify event.
///
Expand Down Expand Up @@ -270,4 +276,4 @@ impl From<Inotify> for OwnedFd {
fn from(value: Inotify) -> Self {
value.fd
}
}
}