Skip to content

Commit 7d03441

Browse files
committed
Document inotify.rs
1 parent 2143ffe commit 7d03441

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/sys/inotify.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,39 +41,63 @@ use cfg_if::cfg_if;
4141
libc_bitflags! {
4242
/// Configuration options for [`inotify_add_watch`](fn.inotify_add_watch.html).
4343
pub struct AddWatchFlags: u32 {
44+
/// File was accessed.
4445
IN_ACCESS;
46+
/// File was modified.
4547
IN_MODIFY;
48+
/// Metadata changed.
4649
IN_ATTRIB;
50+
/// Writable file was closed.
4751
IN_CLOSE_WRITE;
52+
/// Nonwritable file was closed.
4853
IN_CLOSE_NOWRITE;
54+
/// File was opened.
4955
IN_OPEN;
56+
/// File was moved from X.
5057
IN_MOVED_FROM;
58+
/// File was moved to Y.
5159
IN_MOVED_TO;
60+
/// Subfile was created.
5261
IN_CREATE;
62+
/// Subfile was deleted.
5363
IN_DELETE;
64+
/// Self was deleted.
5465
IN_DELETE_SELF;
66+
/// Self was moved.
5567
IN_MOVE_SELF;
5668

69+
/// Backing filesystem was unmounted.
5770
IN_UNMOUNT;
71+
/// Event queue overflowed.
5872
IN_Q_OVERFLOW;
73+
/// File was ignored.
5974
IN_IGNORED;
6075

76+
/// Combination of `IN_CLOSE_WRITE` and `IN_CLOSE_NOWRITE`.
6177
IN_CLOSE;
78+
/// Combination of `IN_MOVED_FROM` and `IN_MOVED_TO`.
6279
IN_MOVE;
6380

81+
/// Only watch the path if it is a directory.
6482
IN_ONLYDIR;
83+
/// Don't follow symlinks.
6584
IN_DONT_FOLLOW;
6685

86+
/// Event occurred against directory.
6787
IN_ISDIR;
88+
/// Only send event once.
6889
IN_ONESHOT;
90+
/// All of the events.
6991
IN_ALL_EVENTS;
7092
}
7193
}
7294

7395
libc_bitflags! {
7496
/// Configuration options for [`inotify_init1`](fn.inotify_init1.html).
7597
pub struct InitFlags: c_int {
98+
/// Set the `FD_CLOEXEC` flag on the file descriptor.
7699
IN_CLOEXEC;
100+
/// Set the `O_NONBLOCK` flag on the open file description referred to by the new file descriptor.
77101
IN_NONBLOCK;
78102
}
79103
}

src/sys/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ feature! {
192192
#[cfg(any(target_os = "android", target_os = "linux"))]
193193
feature! {
194194
#![feature = "inotify"]
195-
#[allow(missing_docs)]
196195
pub mod inotify;
197196
}
198197

0 commit comments

Comments
 (0)