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