Class representing a search PATH. More...
#include <exec-utils.h>
Collaboration diagram for ns3::SearchPath:Public Member Functions | |
| SearchPath (std::string basepath, std::string path, bool virt) | |
| std::string | SeekFile (std::string file, std::string cwd, void *userData, bool(*checker)(std::string, void *)) |
Private Attributes | |
| std::string | m_basePath |
| std::vector< std::string > | m_paths |
| bool | m_virtual |
Class representing a search PATH.
Definition at line 92 of file exec-utils.h.
| ns3::SearchPath::SearchPath | ( | std::string | basepath, |
| std::string | path, | ||
| bool | virt | ||
| ) |
| basepath | indicate the Virtual root if needed. |
| path | a search path like the well know PATH environment variable. |
| virt | if true the basepath indicate a virtual root and then it is forbidden to find file not under this basepath. |
Definition at line 189 of file exec-utils.cc.
References ns3::CanonizePath(), m_basePath, m_paths, and ns3::Split().
Here is the call graph for this function:| std::string ns3::SearchPath::SeekFile | ( | std::string | file, |
| std::string | cwd, | ||
| void * | userData, | ||
| bool(*)(std::string, void *) | checker | ||
| ) |
| file | file seeked, can be a simple name (myfile) or a relative path (./myfile) or an absolute path (/tmp/myfile) |
| cwd | current working directory of the virtual process seeking a file, it is used only if the upper parameter file is a relative path. |
| userData | an opaque data passed to the callback just below |
| checker | a required callback called to check and validate or not the potential files found by this method. |
Definition at line 208 of file exec-utils.cc.
References ns3::CanonizePath(), m_basePath, m_paths, and m_virtual.
Referenced by ns3::SearchAbsoluteFile(), ns3::SearchRelativeFile(), and ns3::SearchSimpleFile().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 115 of file exec-utils.h.
Referenced by SearchPath(), and SeekFile().
|
private |
Definition at line 116 of file exec-utils.h.
Referenced by SearchPath(), and SeekFile().
|
private |
Definition at line 114 of file exec-utils.h.
Referenced by SeekFile().