adbncfs
0.9.1
|
A class to manage informations obtained from the output of the busybox applet mount command. More...
#include <mountInfo.h>
Classes | |
class | Entry |
A class to manage a line obtained from the output of the busybox applet mount command. More... | |
Public Member Functions | |
MountInfo (const deque< string > &mountInfo) | |
Initializes this object with output from the busybox mount command. More... | |
virtual | ~MountInfo () |
const Entry * | mountPoint (const char *pcPath) const |
Returns the mount point of a given path. More... | |
bool | isMountedRo (const char *pcPath) const |
Test if the given path is located on a mount point that is mounted read only. More... | |
bool | isMountedNoexec (const char *pcPath) const |
Test if the given path is located on a mount point that is mounted with the noexec option. More... | |
Private Member Functions | |
MountInfo () | |
const Entry * | findMountPointEntry (const string &strPath) const |
Lookup if there is a mount point entry with the given path. More... | |
Static Private Member Functions | |
static const string | parent (const string &strPath) |
Returns the parent pathname string of the given strPath. More... | |
Private Attributes | |
map< string, Entry > | m_Entries |
A class to manage informations obtained from the output of the busybox applet mount command.
Definition at line 41 of file mountInfo.h.
|
private |
MountInfo::MountInfo | ( | const deque< string > & | mountInfo | ) |
Initializes this object with output from the busybox mount command.
The accepted format for the mount info parameter is one that the busybox applet mount returns. Each output line of the mount command is stored as a queue entry
is stored in a queue with 7 entries
mountInfo | a queue of strings each element containing one mount output line as described above. |
Definition at line 163 of file mountInfo.cpp.
|
inlinevirtual |
Definition at line 107 of file mountInfo.h.
|
private |
Lookup if there is a mount point entry with the given path.
strPath | the path to lookup. |
Definition at line 233 of file mountInfo.cpp.
bool MountInfo::isMountedNoexec | ( | const char * | pcPath | ) | const |
Test if the given path is located on a mount point that is mounted with the noexec option.
pcPath | the path to test for may be null. |
Definition at line 218 of file mountInfo.cpp.
bool MountInfo::isMountedRo | ( | const char * | pcPath | ) | const |
Test if the given path is located on a mount point that is mounted read only.
pcPath | the path to test for may be null. |
Definition at line 203 of file mountInfo.cpp.
const MountInfo::Entry * MountInfo::mountPoint | ( | const char * | pcPath | ) | const |
Returns the mount point of a given path.
pcPath | the path for that the mount point is to retrieve. |
Definition at line 180 of file mountInfo.cpp.
|
staticprivate |
Returns the parent pathname string of the given strPath.
The parent of strPath consists of the pathname's prefix, if any, and each name in the strPath name sequence except for the last.
strPath | the pathname thats parent to retrieve. |
strip last slash if there is one
Definition at line 256 of file mountInfo.cpp.
|
private |
Definition at line 104 of file mountInfo.h.