Skip to main content

fuser/
bsd_file_flags.rs

1use bitflags::bitflags;
2
3bitflags! {
4    /// `chflags(2)`, only used on macOS.
5    #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
6    pub struct BsdFileFlags: u32 {
7        /// Do not dump the file.
8        #[cfg(target_os = "macos")]
9        const UF_NODUMP = libc::UF_NODUMP;
10        /// The file may not be changed.
11        #[cfg(target_os = "macos")]
12        const UF_IMMUTABLE = libc::UF_IMMUTABLE;
13        /// The file may only be appended to.
14        #[cfg(target_os = "macos")]
15        const UF_APPEND = libc::UF_APPEND;
16        /// The directory is opaque when viewed through a union stack.
17        #[cfg(target_os = "macos")]
18        const UF_OPAQUE = libc::UF_OPAQUE;
19        /// The file or directory is not intended to be displayed to the user.
20        #[cfg(target_os = "macos")]
21        const UF_HIDDEN = libc::UF_HIDDEN;
22        /// The file has been archived.
23        #[cfg(target_os = "macos")]
24        const SF_ARCHIVED = libc::SF_ARCHIVED;
25        /// The file may not be changed.
26        #[cfg(target_os = "macos")]
27        const SF_IMMUTABLE = libc::SF_IMMUTABLE;
28        /// The file may only be appended to.
29        #[cfg(target_os = "macos")]
30        const SF_APPEND = libc::SF_APPEND;
31    }
32}