Remove st_mode mask
This commit is contained in:
parent
04c01e0b1f
commit
6ae9fc2772
@ -68,8 +68,8 @@ impl FileExt for fs::File {
|
||||
/// Unix-specific extensions to `Permissions`
|
||||
#[stable(feature = "fs_ext", since = "1.1.0")]
|
||||
pub trait PermissionsExt {
|
||||
/// Returns the 12 least significant bits of `st_mode` which are the
|
||||
/// standard Unix permissions for this file.
|
||||
/// Returns the underlying raw `st_mode` bits that contain the standard
|
||||
/// Unix permissions for this file.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -95,7 +95,7 @@ pub struct DirBuilder { mode: mode_t }
|
||||
impl FileAttr {
|
||||
pub fn size(&self) -> u64 { self.stat.st_size as u64 }
|
||||
pub fn perm(&self) -> FilePermissions {
|
||||
FilePermissions { mode: (self.stat.st_mode as mode_t) & 0o7777 }
|
||||
FilePermissions { mode: (self.stat.st_mode as mode_t) }
|
||||
}
|
||||
|
||||
pub fn file_type(&self) -> FileType {
|
||||
|
Loading…
x
Reference in New Issue
Block a user