pub struct Access {
pub mode: u32,
pub user: u32,
pub group: u32,
pub control: [u8; 32],
}Expand description
Who may use a file or directory, as publishing keeps it: where there are no modes, a read-only file has none of the write bits.
On Unix: the permission bits, the owner and the group, and on Linux the
mandatory access control labels (SELinux, Smack), which publishing
requires to be the same on every entry it compares. Access control that
publishing could not keep is refused when the access is read: on Linux
an access control list. On macOS and Windows access control lists are
neither read nor kept.
Fields§
§mode: u32The permission bits, with the set-user, set-group and sticky bits.
user: u32The owning user.
group: u32The owning group.
control: [u8; 32]A digest of the mandatory access control labels (Linux), all zero where there are none.
Implementations§
Source§impl Access
impl Access
Sourcepub const fn group_reads_alone(&self) -> bool
pub const fn group_reads_alone(&self) -> bool
Whether the group may read and others may not, so that the group says who may.
Sourcepub const fn nested(&self, directory: bool) -> bool
pub const fn nested(&self, directory: bool) -> bool
Whether the classes that may reach content through an entry with
this access, a directory if directory, nest: its owner may
whenever its group may, and its group whenever others may. Where
they do not, as for mode 0604, which denies the group what it
lets others read, who may reach depends on who the owner and group
are, which audience does not say.