summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRyan Zoeller <rtzoeller@rtzoeller.com>2022-01-31 21:32:28 -0600
committerRyan Zoeller <rtzoeller@rtzoeller.com>2022-01-31 21:32:28 -0600
commit7d0344141c63be4b08f1668a298766ebc81ffcc3 (patch)
tree9b1ab676a8f3cf8e31f9f69d81c2a8b9a77b5ba6 /src
parent2143ffe90dbe6821f59d8a775853bcc4cba4dcca (diff)
downloadnix-7d0344141c63be4b08f1668a298766ebc81ffcc3.zip
Document inotify.rs
Diffstat (limited to 'src')
-rw-r--r--src/sys/inotify.rs24
-rw-r--r--src/sys/mod.rs1
2 files changed, 24 insertions, 1 deletions
diff --git a/src/sys/inotify.rs b/src/sys/inotify.rs
index d6697a4a..b19dbe12 100644
--- a/src/sys/inotify.rs
+++ b/src/sys/inotify.rs
@@ -41,31 +41,53 @@ use cfg_if::cfg_if;
libc_bitflags! {
/// Configuration options for [`inotify_add_watch`](fn.inotify_add_watch.html).
pub struct AddWatchFlags: u32 {
+ /// File was accessed.
IN_ACCESS;
+ /// File was modified.
IN_MODIFY;
+ /// Metadata changed.
IN_ATTRIB;
+ /// Writable file was closed.
IN_CLOSE_WRITE;
+ /// Nonwritable file was closed.
IN_CLOSE_NOWRITE;
+ /// File was opened.
IN_OPEN;
+ /// File was moved from X.
IN_MOVED_FROM;
+ /// File was moved to Y.
IN_MOVED_TO;
+ /// Subfile was created.
IN_CREATE;
+ /// Subfile was deleted.
IN_DELETE;
+ /// Self was deleted.
IN_DELETE_SELF;
+ /// Self was moved.
IN_MOVE_SELF;
+ /// Backing filesystem was unmounted.
IN_UNMOUNT;
+ /// Event queue overflowed.
IN_Q_OVERFLOW;
+ /// File was ignored.
IN_IGNORED;
+ /// Combination of `IN_CLOSE_WRITE` and `IN_CLOSE_NOWRITE`.
IN_CLOSE;
+ /// Combination of `IN_MOVED_FROM` and `IN_MOVED_TO`.
IN_MOVE;
+ /// Only watch the path if it is a directory.
IN_ONLYDIR;
+ /// Don't follow symlinks.
IN_DONT_FOLLOW;
+ /// Event occurred against directory.
IN_ISDIR;
+ /// Only send event once.
IN_ONESHOT;
+ /// All of the events.
IN_ALL_EVENTS;
}
}
@@ -73,7 +95,9 @@ libc_bitflags! {
libc_bitflags! {
/// Configuration options for [`inotify_init1`](fn.inotify_init1.html).
pub struct InitFlags: c_int {
+ /// Set the `FD_CLOEXEC` flag on the file descriptor.
IN_CLOEXEC;
+ /// Set the `O_NONBLOCK` flag on the open file description referred to by the new file descriptor.
IN_NONBLOCK;
}
}
diff --git a/src/sys/mod.rs b/src/sys/mod.rs
index 2fd2a698..91423acc 100644
--- a/src/sys/mod.rs
+++ b/src/sys/mod.rs
@@ -192,7 +192,6 @@ feature! {
#[cfg(any(target_os = "android", target_os = "linux"))]
feature! {
#![feature = "inotify"]
- #[allow(missing_docs)]
pub mod inotify;
}