[][src]Struct fstab::FsTab

pub struct FsTab { /* fields omitted */ }

Implementations

impl FsTab[src]

pub fn new(fstab: &Path) -> Self[src]

pub fn get_entries(&self) -> Result<Vec<FsEntry>, Error>[src]

Takes the location to the fstab and parses it. On linux variants this is usually /etc/fstab. On SVR4 systems store block devices and mount point information in /etc/vfstab file. AIX stores block device and mount points information in /etc/filesystems file.

pub fn add_entry(&self, entry: FsEntry) -> Result<bool, Error>[src]

Add a new entry to the fstab. If the fstab previously did not contain this entry then true is returned. Otherwise it will return false indicating it has been updated

pub fn add_entries(&self, entries: Vec<FsEntry>) -> Result<(), Error>[src]

Bulk add a new entries to the fstab.

pub fn remove_entry(&self, spec: &str) -> Result<bool, Error>[src]

Remove the fstab entry that corresponds to the spec given. IE: first fields match Returns true if the value was present in the fstab.

Trait Implementations

impl Debug for FsTab[src]

impl Default for FsTab[src]

Auto Trait Implementations

impl RefUnwindSafe for FsTab

impl Send for FsTab

impl Sync for FsTab

impl Unpin for FsTab

impl UnwindSafe for FsTab

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, 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.