Remove st_mode mask

This commit is contained in:
Trevor Merrifield 2017-09-17 17:42:58 -04:00
parent 04c01e0b1f
commit 6ae9fc2772
2 changed files with 3 additions and 3 deletions

View File

@ -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
///

View File

@ -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 {