Skip to content

Commit

Permalink
Update the inotify docs to remove references to the Inotify type. (#…
Browse files Browse the repository at this point in the history
…539)

Update the inotify documentation to remove references to the `Inotify`
type which is no longer present in the API.
  • Loading branch information
sunfishcode committed Feb 24, 2023
1 parent 2f58d9f commit f9afef3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
10 changes: 7 additions & 3 deletions src/backend/libc/fs/inotify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ use crate::io;
use bitflags::bitflags;

bitflags! {
/// `IN_*` for use with [`Inotify::new`].
/// `IN_*` for use with [`inotify_init`].
///
/// [`inotify_init`]: crate::fs::inotify::inotify_init
pub struct CreateFlags: c::c_int {
/// `IN_CLOEXEC`
const CLOEXEC = c::IN_CLOEXEC;
Expand All @@ -17,7 +19,9 @@ bitflags! {
}

bitflags! {
/// `IN*` for use with [`Inotify::add_watch`].
/// `IN*` for use with [`inotify_add_watch`].
///
/// [`inotify_add_watch`]: crate::fs::inotify::inotify_add_watch
#[derive(Default)]
pub struct WatchFlags: u32 {
/// `IN_ACCESS`
Expand Down Expand Up @@ -67,7 +71,7 @@ bitflags! {
}
}

/// `inotify_init1(flags)`—Creates a new `Inotify`.
/// `inotify_init1(flags)`—Creates a new inotify object.
///
/// Use the [`CreateFlags::CLOEXEC`] flag to prevent the resulting file
/// descriptor from being implicitly passed across `exec` boundaries.
Expand Down
10 changes: 7 additions & 3 deletions src/backend/linux_raw/fs/inotify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ use crate::io;
use bitflags::bitflags;

bitflags! {
/// `IN_*` for use with [`Inotify::new`].
/// `IN_*` for use with [`inotify_init`].
///
/// [`inotify_init`]: crate::fs::inotify::inotify_init
pub struct CreateFlags: c::c_uint {
/// `IN_CLOEXEC`
const CLOEXEC = linux_raw_sys::general::IN_CLOEXEC;
Expand All @@ -17,7 +19,9 @@ bitflags! {
}

bitflags! {
/// `IN*` for use with [`Inotify::add_watch`].
/// `IN*` for use with [`inotify_add_watch`].
///
/// [`inotify_add_watch`]: crate::fs::inotify::inotify_add_watch
#[derive(Default)]
pub struct WatchFlags: c::c_uint {
/// `IN_ACCESS`
Expand Down Expand Up @@ -67,7 +71,7 @@ bitflags! {
}
}

/// `inotify_init1(flags)`—Creates a new `Inotify`.
/// `inotify_init1(flags)`—Creates a new inotify object.
///
/// Use the [`CreateFlags::CLOEXEC`] flag to prevent the resulting file
/// descriptor from being implicitly passed across `exec` boundaries.
Expand Down
1 change: 0 additions & 1 deletion src/io/read_write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ pub use backend::io::io_slice::{IoSlice, IoSliceMut};
#[cfg(feature = "std")]
pub use std::io::{IoSlice, IoSliceMut};

/// `RWF_*` constants for use with [`preadv2`] and [`pwritev2`].
#[cfg(any(target_os = "android", target_os = "linux"))]
pub use backend::io::types::ReadWriteFlags;

Expand Down

0 comments on commit f9afef3

Please sign in to comment.