Arion 1.0.2-alpha
A high-performance C++ framework for emulating executable binaries.
 
Loading...
Searching...
No Matches
arion::ProcFSManager Class Reference

This class is used to emulate the behavior of the procfs filesystem. More...

#include <file_system_manager.hpp>

Public Member Functions

 ProcFSManager (std::weak_ptr< Arion > arion)
 
bool is_procfs_path (std::string path)
 
std::string convert (std::string path)
 

Static Public Member Functions

static std::unique_ptr< ProcFSManagerinitialize (std::weak_ptr< Arion > arion)
 

Private Attributes

std::weak_ptr< Arionarion
 The Arion instance used for emulation.
 

Static Private Attributes

static const std::regex PROCFS_REGEX = std::regex(R"(^/proc/([0-9]+|self)/([^/]+)$)")
 This regex is used to check whether a file path is located inside the system procfs.
 

Detailed Description

This class is used to emulate the behavior of the procfs filesystem.

Constructor & Destructor Documentation

◆ ProcFSManager()

arion::ProcFSManager::ProcFSManager ( std::weak_ptr< Arion arion)
inline

Builder for ProcFSManager instances.

Parameters
[in]rionThe Arion instance used for emulation.

Member Function Documentation

◆ convert()

std::string arion::ProcFSManager::convert ( std::string  path)

Converts a procfs path into a rootfs path.

Parameters
[in]pathThe procfs path.
Returns
The converted rootfs path.

◆ initialize()

static std::unique_ptr< ProcFSManager > arion::ProcFSManager::initialize ( std::weak_ptr< Arion arion)
static

◆ is_procfs_path()

bool arion::ProcFSManager::is_procfs_path ( std::string  path)

Checks whether the given path is located inside the system procfs.

Parameters
[in]pathThe path to check.
Returns
True if the given path is located inside the system procfs.

Member Data Documentation

◆ arion

std::weak_ptr<Arion> arion::ProcFSManager::arion
private

The Arion instance used for emulation.

◆ PROCFS_REGEX

const std::regex arion::ProcFSManager::PROCFS_REGEX = std::regex(R"(^/proc/([0-9]+|self)/([^/]+)$)")
inlinestaticprivate

This regex is used to check whether a file path is located inside the system procfs.


The documentation for this class was generated from the following file: