ns3::SystemPath implementation. More...
#include "system-path.h"
#include "fatal-error.h"
#include "assert.h"
#include "log.h"
#include "ns3/core-config.h"
#include <algorithm>
#include <cstdlib>
#include <cerrno>
#include <cstring>
#include <tuple>
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
#include <sstream>
Go to the source code of this file.
Namespaces | |
ns3 | |
Every class exported by the ns3 library is enclosed in the ns3 namespace. | |
ns3::anonymous_namespace{system-path.cc} | |
ns3::SystemPath | |
Namespace for various file and directory path functions. | |
Macros | |
#define | HAVE_MKDIR_H |
Do we have a makedir function? More... | |
#define | HAVE_OPENDIR |
Do we have an opendir function? More... | |
#define | SYSTEM_PATH_SEP "/" |
System-specific path separator used between directory names. More... | |
Functions | |
std::string | ns3::SystemPath::Append (std::string left, std::string right) |
Join two file system path elements. More... | |
std::string | ns3::SystemPath::Dirname (std::string path) |
Get the directory path for a file. More... | |
bool | ns3::SystemPath::Exists (const std::string path) |
Check if a path exists. More... | |
std::string | ns3::SystemPath::FindSelfDirectory (void) |
Get the file system path to the current executable. More... | |
std::string | ns3::SystemPath::Join (std::list< std::string >::const_iterator begin, std::list< std::string >::const_iterator end) |
Join a list of file system path directories into a single file system path. More... | |
void | ns3::SystemPath::MakeDirectories (std::string path) |
Create all the directories leading to path. More... | |
std::string | ns3::SystemPath::MakeTemporaryDirectoryName (void) |
Get the name of a temporary directory. More... | |
std::list< std::string > | ns3::SystemPath::ReadFiles (std::string path) |
Get the list of files located in a file system directory. More... | |
std::tuple< std::list< std::string >, bool > | ns3::anonymous_namespace{system-path.cc}::ReadFilesNoThrow (std::string path) |
Get the list of files located in a file system directory with error. More... | |
std::list< std::string > | ns3::SystemPath::Split (std::string path) |
Split a file system path into directories according to the local path separator. More... | |
ns3::SystemPath implementation.
Definition in file system-path.cc.
#define HAVE_MKDIR_H |
Do we have a makedir
function?
Definition at line 40 of file system-path.cc.
#define HAVE_OPENDIR |
Do we have an opendir
function?
Definition at line 34 of file system-path.cc.
#define SYSTEM_PATH_SEP "/" |
System-specific path separator used between directory names.
Definition at line 65 of file system-path.cc.