Dune Core Modules (unstable)

path.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5#ifndef DUNE_COMMON_PATH_HH
6#define DUNE_COMMON_PATH_HH
7
8#include <string>
9
10namespace Dune {
23
51 std::string concatPaths(const std::string& base, const std::string& p);
52
54
98 std::string processPath(const std::string& p);
99
101
109 bool pathIndicatesDirectory(const std::string& p);
110
112
151 std::string prettyPath(const std::string& p, bool isDirectory);
152
154
160 std::string prettyPath(const std::string& p);
161
163
179 std::string relativePath(const std::string& newbase, const std::string& p);
180
182}
183
184#endif // DUNE_COMMON_PATH_HH
std::string processPath(const std::string &p)
sanitize a path for further processing
Definition: path.cc:37
bool pathIndicatesDirectory(const std::string &p)
check whether the given path indicates that it is a directory
Definition: path.cc:111
std::string prettyPath(const std::string &p, bool isDirectory)
pretty print path
Definition: path.cc:122
std::string relativePath(const std::string &newbase, const std::string &p)
compute a relative path between two paths
Definition: path.cc:149
std::string concatPaths(const std::string &base, const std::string &p)
concatenate two paths
Definition: path.cc:28
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)