ChimeraTK-DeviceAccess  03.18.00
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
ChimeraTK::parserUtilities::getCurrentWorkingDirectory
std::string getCurrentWorkingDirectory()
Returns absolute path to current working directory. The returned path ends with a forward slash.
Definition: parserUtilities.cc:19
ChimeraTK::parserUtilities::extractFileName
std::string extractFileName(std::string const &path)
Extract the string after the last '/' in a path. Returned substring does not include the '/' characte...
Definition: parserUtilities.cc:48
ChimeraTK::parserUtilities::convertToAbsolutePath
std::string convertToAbsolutePath(std::string const &relativePath)
Converts a relative path to its absolute path.
Definition: parserUtilities.cc:23
ChimeraTK::parserUtilities::extractDirectory
std::string extractDirectory(std::string const &path)
Returns the path to the directory containing the file provided as the input parameter.
Definition: parserUtilities.cc:35
ChimeraTK::parserUtilities::concatenatePaths
std::string concatenatePaths(const std::string &path1, const std::string &path2)
Concatenates two given paths using custom rules.
Definition: parserUtilities.cc:27
ChimeraTK::parserUtilities
Definition: parserUtilities.h:7