[][src]Struct fungus::sys::Chmod

pub struct Chmod { /* fields omitted */ }

Chmod provides flexible options for changing file permission with optional configuration.

Methods

impl Chmod[src]

Important traits for &'_ mut W
pub fn all(&mut self) -> &mut Self[src]

Target all files and directories. Default is enabled.

Important traits for &'_ mut W
pub fn dirs(&mut self) -> &mut Self[src]

Target only directories. Default is disabled.

Important traits for &'_ mut W
pub fn files(&mut self) -> &mut Self[src]

Target only files. Default is disabled.

Important traits for &'_ mut W
pub fn mode(&mut self, mode: u32) -> &mut Self[src]

Update the mode option. Default is the current file's mode or to 0o644 if it doesn't exist

Important traits for &'_ mut W
pub fn add_r(&mut self) -> &mut Self[src]

Update the mode option to add read permission to all.

Important traits for &'_ mut W
pub fn add_w(&mut self) -> &mut Self[src]

Update the mode option to add write permission to all.

Important traits for &'_ mut W
pub fn add_x(&mut self) -> &mut Self[src]

Update the mode option to add execute permission to all.

Important traits for &'_ mut W
pub fn readonly(&mut self) -> &mut Self[src]

Update the mode option to make readonly.

Important traits for &'_ mut W
pub fn secure(&mut self) -> &mut Self[src]

Update the mode option to drop group and other permissions.

Important traits for &'_ mut W
pub fn sub_r(&mut self) -> &mut Self[src]

Update the mode option to subtract read permission from all.

Important traits for &'_ mut W
pub fn sub_w(&mut self) -> &mut Self[src]

Update the mode option to subtract write permission from all.

Important traits for &'_ mut W
pub fn sub_x(&mut self) -> &mut Self[src]

Update the mode option to subtract execute permission from all.

Important traits for &'_ mut W
pub fn path<T: AsRef<Path>>(&mut self, path: T) -> &mut Self[src]

Update the path option.

Important traits for &'_ mut W
pub fn recurse(&mut self, yes: bool) -> &mut Self[src]

Update the recurse option. Default is enabled. When yes is true, source is recursively walked.

pub fn chmod(&self) -> Result<()>[src]

Execute the Chmod options against the set path with the set mode.

Trait Implementations

impl Clone for Chmod[src]

impl Debug for Chmod[src]

Auto Trait Implementations

impl RefUnwindSafe for Chmod

impl Send for Chmod

impl Sync for Chmod

impl Unpin for Chmod

impl UnwindSafe for Chmod

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,