mirror of
https://gitee.com/openharmony/third_party_rust_nix
synced 2025-03-02 13:35:54 +00:00
Document inotify.rs
This commit is contained in:
parent
2143ffe90d
commit
7d0344141c
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -192,7 +192,6 @@ feature! {
|
||||
#[cfg(any(target_os = "android", target_os = "linux"))]
|
||||
feature! {
|
||||
#![feature = "inotify"]
|
||||
#[allow(missing_docs)]
|
||||
pub mod inotify;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user