Confdump Agent
1.4.0
|
Context of the access to this system. More...
#include <LinuxDumper.hpp>
Public Member Functions | |
boost::shared_ptr< std::streambuf > | openRoFile (const boost::filesystem::path &path) const |
Conveniently open a read-only file. | |
SystemContext (boost::shared_ptr< LinuxDumper > driver) | |
~SystemContext () | |
Result | allConfigurationFiles () const |
QByteArray | slurpConfigurationFile (const boost::filesystem::path &path, QString refersToTable) |
Conveniently obtain the contents of a file. | |
QByteArray | slurpConfigurationFile (QString path, QString refersToTable) |
Conveniently obtain the contents of a file. | |
Private Member Functions | |
SystemContext () | |
Private Attributes | |
Result | configurationFiles_ |
boost::shared_ptr< LinuxDumper > | driver_ |
Context of the access to this system.
This class provides a level of abstraction over all system accesses that may be subject to a user-specified context. It also provides convience wrappers over basic functions.
Example: file access may be done in a specified root for forensics/recovery purposes ("/mnt"), although the default (and only option at the moment) is to use the filesystem root "/".
Definition at line 59 of file LinuxDumper.hpp.
Confdump::System::LinuxDumper::SystemContext::SystemContext | ( | boost::shared_ptr< LinuxDumper > | driver | ) |
Definition at line 116 of file LinuxDumper.cpp.
Definition at line 121 of file LinuxDumper.cpp.
Definition at line 154 of file LinuxDumper.cpp.
Referenced by Confdump::System::LinuxDumper::allConfigurationFiles().
shared_ptr< std::streambuf > Confdump::System::LinuxDumper::SystemContext::openRoFile | ( | const boost::filesystem::path & | path | ) | const |
Conveniently open a read-only file.
Opens the file represented by path as a streambuf ready for I/O operations.
Files opened this way are not automatically added to the ConfigurationFile table.
boost::system::system_error | on failure |
Definition at line 125 of file LinuxDumper.cpp.
QByteArray Confdump::System::LinuxDumper::SystemContext::slurpConfigurationFile | ( | const boost::filesystem::path & | path, |
QString | refersToTable | ||
) |
Conveniently obtain the contents of a file.
Opens the file represented by path and returns the content as a QByteArray.
Files obtained this way are automatically added to the ConfiguratilFile table.
boost::system::system_error | on failure |
Definition at line 141 of file LinuxDumper.cpp.
QByteArray Confdump::System::LinuxDumper::SystemContext::slurpConfigurationFile | ( | QString | path, |
QString | refersToTable | ||
) |
Conveniently obtain the contents of a file.
Opens the file represented by path and returns the content as a QByteArray.
Files obtained this way are automatically added to the ConfiguratilFile table.
boost::system::system_error | on failure |
Definition at line 148 of file LinuxDumper.cpp.
Definition at line 93 of file LinuxDumper.hpp.
boost::shared_ptr<LinuxDumper> Confdump::System::LinuxDumper::SystemContext::driver_ [private] |
Definition at line 94 of file LinuxDumper.hpp.