File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -152,12 +152,20 @@ impl Inotify {
152
152
/// Returns an EINVAL error if the watch descriptor is invalid.
153
153
///
154
154
/// For more information see, [inotify_rm_watch(2)](http://man7.org/linux/man-pages/man2/inotify_rm_watch.2.html).
155
+ #[ cfg( target_os = "linux" ) ]
155
156
pub fn rm_watch ( & self , wd : WatchDescriptor ) -> Result < ( ) > {
156
157
let res = unsafe { libc:: inotify_rm_watch ( self . fd , wd. wd ) } ;
157
158
158
159
Errno :: result ( res) . map ( drop)
159
160
}
160
161
162
+ #[ cfg( target_os = "android" ) ]
163
+ pub fn rm_watch ( & self , wd : WatchDescriptor ) -> Result < ( ) > {
164
+ let res = unsafe { libc:: inotify_rm_watch ( self . fd , wd. wd as u32 ) } ;
165
+
166
+ Errno :: result ( res) . map ( drop)
167
+ }
168
+
161
169
/// Reads a collection of events from the inotify file descriptor. This call
162
170
/// can either be blocking or non blocking depending on whether IN_NONBLOCK
163
171
/// was set at initialization.
You can’t perform that action at this time.
0 commit comments