pub struct FsTab { /* private fields */ }
Implementations§
Source§impl FsTab
impl FsTab
pub fn new(fstab: &Path) -> Self
Sourcepub fn get_entries(&self) -> Result<Vec<FsEntry>, Error>
pub fn get_entries(&self) -> Result<Vec<FsEntry>, Error>
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.
Sourcepub fn add_entry(&self, entry: FsEntry) -> Result<bool, Error>
pub fn add_entry(&self, entry: FsEntry) -> Result<bool, Error>
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
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FsTab
impl RefUnwindSafe for FsTab
impl Send for FsTab
impl Sync for FsTab
impl Unpin for FsTab
impl UnwindSafe for FsTab
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