Struct openssh_sftp_client::metadata::Permissions
source · [−]pub struct Permissions(_);
Expand description
Representation of the various permissions on a file.
Implementations
sourceimpl Permissions
impl Permissions
sourcepub fn read_by_owner(&self) -> bool
pub fn read_by_owner(&self) -> bool
Tests whether read by owner bit is set.
sourcepub fn set_read_by_owner(&mut self, value: bool)
pub fn set_read_by_owner(&mut self, value: bool)
Modify the read by owner bit.
sourcepub fn write_by_owner(&self) -> bool
pub fn write_by_owner(&self) -> bool
Tests whether write by owner bit is set.
sourcepub fn set_write_by_owner(&mut self, value: bool)
pub fn set_write_by_owner(&mut self, value: bool)
Modify the write by owner bit.
sourcepub fn execute_by_owner(&self) -> bool
pub fn execute_by_owner(&self) -> bool
Tests whether execute by owner bit is set.
sourcepub fn set_execute_by_owner(&mut self, value: bool)
pub fn set_execute_by_owner(&mut self, value: bool)
Modify the execute by owner bit.
sourcepub fn read_by_group(&self) -> bool
pub fn read_by_group(&self) -> bool
Tests whether read by group bit is set.
sourcepub fn set_read_by_group(&mut self, value: bool)
pub fn set_read_by_group(&mut self, value: bool)
Modify the read by group bit.
sourcepub fn write_by_group(&self) -> bool
pub fn write_by_group(&self) -> bool
Tests whether write by group bit is set.
sourcepub fn set_write_by_group(&mut self, value: bool)
pub fn set_write_by_group(&mut self, value: bool)
Modify the write by group bit.
sourcepub fn execute_by_group(&self) -> bool
pub fn execute_by_group(&self) -> bool
Tests whether execute by group bit is set.
sourcepub fn set_execute_by_group(&mut self, value: bool)
pub fn set_execute_by_group(&mut self, value: bool)
Modify the execute by group bit.
sourcepub fn read_by_other(&self) -> bool
pub fn read_by_other(&self) -> bool
Tests whether read by other bit is set.
sourcepub fn set_read_by_other(&mut self, value: bool)
pub fn set_read_by_other(&mut self, value: bool)
Modify the read by other bit.
sourcepub fn write_by_other(&self) -> bool
pub fn write_by_other(&self) -> bool
Tests whether write by other bit is set.
sourcepub fn set_write_by_other(&mut self, value: bool)
pub fn set_write_by_other(&mut self, value: bool)
Modify the write by other bit.
sourcepub fn execute_by_other(&self) -> bool
pub fn execute_by_other(&self) -> bool
Tests whether execute by other bit is set.
sourcepub fn set_execute_by_other(&mut self, value: bool)
pub fn set_execute_by_other(&mut self, value: bool)
Modify the execute by other bit.
sourcepub fn readonly(&self) -> bool
pub fn readonly(&self) -> bool
Returns true
if these permissions describe an unwritable file
that no one can write to.
sourcepub fn set_readonly(&mut self, readonly: bool)
pub fn set_readonly(&mut self, readonly: bool)
Modifies the readonly flag for this set of permissions.
If the readonly argument is true, it will remove write permissions from all parties.
Conversely, if it’s false, it will permit writing from all parties.
This operation does not modify the filesystem.
To modify the filesystem use the super::fs::Fs::set_permissions
or
the super::file::File::set_permissions
function.
Trait Implementations
sourceimpl Clone for Permissions
impl Clone for Permissions
sourcefn clone(&self) -> Permissions
fn clone(&self) -> Permissions
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more