A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
system-path.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008 INRIA
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18
*/
19
#ifndef SYSTEM_PATH_H
20
#define SYSTEM_PATH_H
21
22
#include <list>
23
#include <string>
24
31
namespace
ns3
32
{
33
48
namespace
SystemPath
49
{
50
60
std::string
FindSelfDirectory
();
61
70
std::string
Append
(std::string left, std::string right);
71
84
std::list<std::string>
Split
(std::string path);
85
97
std::string
Join
(std::list<std::string>::const_iterator begin,
98
std::list<std::string>::const_iterator end);
99
107
std::list<std::string>
ReadFiles
(std::string path);
108
135
std::string
MakeTemporaryDirectoryName
();
136
143
void
MakeDirectories
(std::string path);
144
152
bool
Exists
(
const
std::string path);
153
162
std::string
CreateValidSystemPath
(
const
std::string path);
163
164
}
// namespace SystemPath
165
166
}
// namespace ns3
167
168
#endif
/* SYSTEM_PATH_H */
ns3::SystemPath::ReadFiles
std::list< std::string > ReadFiles(std::string path)
Get the list of files located in a file system directory.
Definition:
system-path.cc:291
ns3::SystemPath::Exists
bool Exists(const std::string path)
Check if a path exists.
Definition:
system-path.cc:367
ns3::SystemPath::Split
std::list< std::string > Split(std::string path)
Split a file system path into directories according to the local path separator.
Definition:
system-path.cc:258
ns3::SystemPath::MakeDirectories
void MakeDirectories(std::string path)
Create all the directories leading to path.
Definition:
system-path.cc:350
ns3::SystemPath::MakeTemporaryDirectoryName
std::string MakeTemporaryDirectoryName()
Get the name of a temporary directory.
Definition:
system-path.cc:305
ns3::SystemPath::Append
std::string Append(std::string left, std::string right)
Join two file system path elements.
Definition:
system-path.cc:240
ns3::SystemPath::Join
std::string 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.
Definition:
system-path.cc:267
ns3::SystemPath::CreateValidSystemPath
std::string CreateValidSystemPath(const std::string path)
Replace incompatible characters in a path, to get a path compatible with different file systems.
Definition:
system-path.cc:412
ns3::SystemPath::FindSelfDirectory
std::string FindSelfDirectory()
Get the file system path to the current executable.
Definition:
system-path.cc:150
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
core
model
system-path.h
Generated on Sun Jul 2 2023 18:21:32 for ns-3 by
1.9.6