A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
system-path.cc File Reference

ns3::SystemPath implementation. More...

#include "system-path.h"
#include "assert.h"
#include "environment-variable.h"
#include "fatal-error.h"
#include "log.h"
#include "string.h"
#include <algorithm>
#include <ctime>
#include <filesystem>
#include <regex>
#include <sstream>
#include <tuple>
+ Include dependency graph for system-path.cc:

Go to the source code of this file.

Namespaces

namespace  ns3
 Every class exported by the ns3 library is enclosed in the ns3 namespace.
 
namespace  ns3::anonymous_namespace{system-path.cc}
 
namespace  ns3::SystemPath
 Namespace for various file and directory path functions.
 

Functions

std::string ns3::SystemPath::Append (std::string left, std::string right)
 Join two file system path elements.
 
std::string ns3::SystemPath::CreateValidSystemPath (const std::string path)
 Replace incompatible characters in a path, to get a path compatible with different file systems.
 
std::string ns3::SystemPath::Dirname (std::string path)
 Get the directory path for a file.
 
bool ns3::SystemPath::Exists (const std::string path)
 Check if a path exists.
 
std::string ns3::SystemPath::FindSelfDirectory ()
 Get the file system path to the current executable.
 
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.
 
void ns3::SystemPath::MakeDirectories (std::string path)
 Create all the directories leading to path.
 
std::string ns3::SystemPath::MakeTemporaryDirectoryName ()
 Get the name of a temporary directory.
 
std::list< std::string > ns3::SystemPath::ReadFiles (std::string path)
 Get the list of files located in a file system directory.
 
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.
 
std::list< std::string > ns3::SystemPath::Split (std::string path)
 Split a file system path into directories according to the local path separator.
 

Variables

constexpr auto SYSTEM_PATH_SEP = "/"
 System-specific path separator used between directory names.
 

Detailed Description

ns3::SystemPath implementation.

Definition in file system-path.cc.

Variable Documentation

◆ SYSTEM_PATH_SEP

auto SYSTEM_PATH_SEP = "/"
constexpr

System-specific path separator used between directory names.

Definition at line 49 of file system-path.cc.

Referenced by ns3::SystemPath::Append(), ns3::SystemPath::Join(), ns3::SystemPath::MakeTemporaryDirectoryName(), and ns3::SystemPath::Split().