plptools
Loading...
Searching...
No Matches
path.h
Go to the documentation of this file.
1/*
2 * This file is part of plptools.
3 *
4 * Copyright (C) 1999 Philip Proudman <philip.proudman@btinternet.com>
5 * Copyright (C) 1999-2002 Fritz Elfert <felfert@to.com>
6 * Copyright (C) 2006-2025 Reuben Thomas <rrt@sc3d.org>
7 * Copyright (C) 2026 Jason Morley <hello@jbmorley.co.uk>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
21 *
22 */
23
24#pragma once
25
26#include "config.h"
27
28#include <string>
29
36class Path {
37public:
38
44 static std::string getEPOCBasename(std::string path);
45
49 static char *getEPOCDirname(const char *path);
50
56 static char *resolveEPOCPath(const char *path, const char *initialPath);
57
58};
Conveniences for working with paths.
Definition: path.h:36
static std::string getEPOCBasename(std::string path)
Returns the last path component of an EPOC path.
Definition: path.cc:31
static char * resolveEPOCPath(const char *path, const char *initialPath)
Returns a new absolute EPOC path, determined by resolving path relative to initialPath.
Definition: path.cc:64
static char * getEPOCDirname(const char *path)
Compute parent directory of an EPOC directory.
Definition: path.cc:39