pub(crate) const STICKY_BIT: u32 = 0o1000;
Available on
target_family="unix"
only.Expand description
Definition for the “sticky bit”, which on Unix means that the contents of directory may not be renamed, deleted, or otherwise modified by a non-owner of those contents, even if the user has write permissions on the directory.
This is the usual behavior for /tmp: You can make your own directories in /tmp, but you can’t modify other people’s.
(We’d use libc’s version of S_ISVTX
, but they vacillate between u16 and
u32 depending what platform you’re on.)