ChimeraTK-DeviceAccess 03.25.00
Loading...
Searching...
No Matches
parserUtilities.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2// SPDX-License-Identifier: LGPL-3.0-or-later
3#pragma once
4
5#include <string>
6
8
16 std::string getCurrentWorkingDirectory();
17
30 std::string convertToAbsolutePath(std::string const& relativePath);
31
45 std::string extractDirectory(std::string const& path);
46
55 std::string extractFileName(std::string const& path);
56
71 std::string concatenatePaths(const std::string& path1, const std::string& path2);
72} // namespace ChimeraTK::parserUtilities
std::string extractFileName(std::string const &path)
Extract the string after the last '/' in a path. Returned substring does not include the '/' characte...
std::string getCurrentWorkingDirectory()
Returns absolute path to current working directory. The returned path ends with a forward slash.
std::string extractDirectory(std::string const &path)
Returns the path to the directory containing the file provided as the input parameter.
std::string concatenatePaths(const std::string &path1, const std::string &path2)
Concatenates two given paths using custom rules.
std::string convertToAbsolutePath(std::string const &relativePath)
Converts a relative path to its absolute path.