Interface to the mount program.
More...
#include </home/abuild/rpmbuild/BUILD/libzypp-17.31.23/zypp-media/mount.h>
|
| Mount () |
| Create an new instance.
|
|
| ~Mount () |
| Clean up.
|
|
void | mount (const std::string &source, const std::string &target, const std::string &filesystem, const std::string &options, const Environment &environment=Environment()) |
| mount device
|
|
void | umount (const std::string &path) |
| umount device
|
|
|
static MountEntries | getEntries (const std::string &mtab="") |
| Return mount entries from /etc/mtab or /etc/fstab file.
|
|
static time_t | getMTime () |
| Get the modification time of the /etc/mtab file.
|
|
Interface to the mount program.
Definition at line 74 of file mount.h.
◆ Environment
For passing additional environment variables to mount.
Definition at line 82 of file mount.h.
◆ Options
Mount options.
'key' or 'key=value' pairs, separated by ','
Definition at line 87 of file mount.h.
◆ Mount()
zypp::media::Mount::Mount |
( |
| ) |
|
Create an new instance.
Definition at line 56 of file mount.cc.
◆ ~Mount()
zypp::media::Mount::~Mount |
( |
| ) |
|
◆ mount()
void zypp::media::Mount::mount |
( |
const std::string & |
source, |
|
|
const std::string & |
target, |
|
|
const std::string & |
filesystem, |
|
|
const std::string & |
options, |
|
|
const Environment & |
environment = Environment() |
|
) |
| |
mount device
- Parameters
-
source | what to mount (e.g. /dev/hda3) |
target | where to mount (e.g. /mnt) |
filesystem | which filesystem to use (e.g. reiserfs) (-t parameter) |
options | mount options (e.g. ro) (-o parameter) |
environment | optinal environment to pass (e.g. PASSWD="sennah") |
- Exceptions
-
Definition at line 62 of file mount.cc.
◆ umount()
void zypp::media::Mount::umount |
( |
const std::string & |
path | ) |
|
umount device
- Parameters
-
path | device or mountpoint to umount |
- Exceptions
-
Definition at line 117 of file mount.cc.
◆ getEntries()
MountEntries zypp::media::Mount::getEntries |
( |
const std::string & |
mtab = "" | ) |
|
|
static |
Return mount entries from /etc/mtab or /etc/fstab file.
- Parameters
-
mtab | The name of the (mounted) file system description file to read from. This file should be one /etc/mtab, /etc/fstab or /proc/mounts. Default is to read /proc/mounts and /etc/mtab in case is not a symlink to /proc/mounts. |
- Returns
- A vector with mount entries or empty vector if reading or parsing of the mtab file(s) failed.
Definition at line 169 of file mount.cc.
◆ getMTime()
time_t zypp::media::Mount::getMTime |
( |
| ) |
|
|
static |
Get the modification time of the /etc/mtab file.
- Returns
- Modification time of the /etc/mtab file.
Definition at line 264 of file mount.cc.
The documentation for this class was generated from the following files: