Struct fstab::FsTab
[−]
[src]
pub struct FsTab { /* fields omitted */ }
Methods
impl FsTab
[src]
fn new(fstab: &Path) -> Self
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.
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
fn add_entries(&self, entries: Vec<FsEntry>) -> Result<(), Error>
Bulk add a new entries to the fstab.
fn remove_entry(&self, spec: &str) -> Result<bool, Error>
Remove the fstab entry that corresponds to the spec given. IE: first fields match Returns true if the value was present in the fstab.