/usr/include/ns3.26/ns3/system-path.h is in libns3-dev 3.26+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
*/
#ifndef SYSTEM_PATH
#define SYSTEM_PATH
#include <string>
#include <list>
/**
* \file
* \ingroup systempath
* System-independent file and directory function declarations.
*/
namespace ns3 {
/**
* \ingroup system
* \defgroup systempath Host Filesystem
* \brief Encapsulate OS-specific functions to manipulate file
* and directory paths.
*
* The functions provided here are used mostly to implement
* the ns-3 test framework.
*/
/**
* \ingroup systempath
* \brief Namespace for various file and directory path functions.
*/
namespace SystemPath {
/**
* \ingroup systempath
* Get the file system path to the current executable.
*
* \return The directory in which the currently-executing binary is located
*/
std::string FindSelfDirectory (void);
/**
* \ingroup systempath
* Join two file system path elements.
*
* \param [in] left A path element
* \param [in] right A path element
* \return A concatenation of the two input paths
*/
std::string Append (std::string left, std::string right);
/**
* \ingroup systempath
* Split a file system path into directories according to
* the local path separator.
*
* This is the inverse of Join.
*
* \param [in] path A path
* \return A list of path elements that can be joined together again with
* the Join function.
* \sa ns3::SystemPath::Join
*/
std::list<std::string> Split (std::string path);
/**
* Join a list of file system path directories into a single
* file system path.
*
* This is the inverse of Split.
*
* \ingroup systempath
* \param [in] begin Iterator to first element to join
* \param [in] end Iterator to last element to join
* \return A path that is a concatenation of all the input elements.
*/
std::string Join (std::list<std::string>::const_iterator begin,
std::list<std::string>::const_iterator end);
/**
* \ingroup systempath
* Get the list of files located in a file system directory.
*
* \param [in] path A path which identifies a directory
* \return A list of the filenames which are located in the input directory
*/
std::list<std::string> ReadFiles (std::string path);
/**
* \ingroup systempath
* Get the name of a temporary directory.
*
* The returned path identifies a directory which does not exist yet.
* Call ns3::SystemPath::MakeDirectories to create it. Yes, there is a
* well-known security race in this API but we don't care in ns-3.
*
* \return A path which identifies a temporary directory.
*/
std::string MakeTemporaryDirectoryName (void);
/**
* \ingroup systempath
* Create all the directories leading to path.
*
* \param [in] path A path to a directory
*/
void MakeDirectories (std::string path);
} // namespace SystemPath
} // namespace ns3
#endif /* SYSTEM_PATH */
|