pub struct FsPermission { /* private fields */ }
Implementations§
Source§impl FsPermission
impl FsPermission
pub fn update_short(&mut self, n: i16)
Sourcepub fn apply_umask(&self, umask: &FsPermission) -> Self
pub fn apply_umask(&self, umask: &FsPermission) -> Self
Apply a umask to this permission and return a new one.
The umask is used by create, mkdir, and other Hadoop filesystem operations. The mode argument for these operations is modified by removing the bits which are set in the umask. Thus, the umask limits the permissions which newly created files and directories get.
Sourcepub fn get_umask(conf: Option<&Configuration>) -> Result<Self>
pub fn get_umask(conf: Option<&Configuration>) -> Result<Self>
Get the user file creation mask (umask)
[UMASK_LABEL
] config param has umask value that is either symbolic
or octal.
Symbolic umask is applied relative to file mode creation mask; the permission op characters ‘+’ clears the corresponding bit in the mask, ‘-’ sets bits in the mask.
Octal umask, the specified bits are set in the file mode creation mask.
Sourcepub fn get_dir_default() -> Self
pub fn get_dir_default() -> Self
Get the default permission for directory.
Sourcepub fn get_file_default() -> Self
pub fn get_file_default() -> Self
Get the default permission for file.
Trait Implementations§
Source§impl Clone for FsPermission
impl Clone for FsPermission
Source§fn clone(&self) -> FsPermission
fn clone(&self) -> FsPermission
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Into<FsPermissionProto> for &FsPermission
impl Into<FsPermissionProto> for &FsPermission
Source§fn into(self) -> FsPermissionProto
fn into(self) -> FsPermissionProto
Converts this type into the (usually inferred) input type.
impl Copy for FsPermission
Auto Trait Implementations§
impl Freeze for FsPermission
impl RefUnwindSafe for FsPermission
impl Send for FsPermission
impl Sync for FsPermission
impl Unpin for FsPermission
impl UnwindSafe for FsPermission
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more