mc_rtc  2.15.0
path.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015-2024 CNRS-UM LIRMM, CNRS-AIST JRL
3  */
4 
5 #pragma once
6 
7 #include <mc_rtc/utils_api.h>
8 
9 #include <filesystem>
10 #include <string>
11 
12 namespace fs = std::filesystem;
13 
14 namespace mc_rtc
15 {
16 
21 MC_RTC_UTILS_DLLAPI std::string temp_directory_path(const std::string & suffix = "");
22 
31 MC_RTC_UTILS_DLLAPI std::string user_config_directory_path(const std::string & suffix = "");
32 
43 MC_RTC_UTILS_DLLAPI std::string local_share_directory(const std::string & suffix = "");
44 
55 MC_RTC_UTILS_DLLAPI std::string filename(const fs::path & path, bool keepExtension = false);
56 
73 MC_RTC_UTILS_DLLAPI fs::path convertURI(const std::string & uri, [[maybe_unused]] std::string_view default_dir = "");
74 
85 MC_RTC_UTILS_DLLAPI std::string make_temporary_path(const std::string & prefix);
86 
97 MC_RTC_UTILS_DLLAPI std::string unique_path(std::string pattern);
98 
99 } // namespace mc_rtc
Definition: Contact.h:88
MC_RTC_UTILS_DLLAPI std::string user_config_directory_path(const std::string &suffix="")
MC_RTC_UTILS_DLLAPI fs::path convertURI(const std::string &uri, [[maybe_unused]] std::string_view default_dir="")
MC_RTC_UTILS_DLLAPI std::string temp_directory_path(const std::string &suffix="")
MC_RTC_UTILS_DLLAPI std::string local_share_directory(const std::string &suffix="")
MC_RTC_UTILS_DLLAPI std::string unique_path(std::string pattern)
Generates a unique path string by replacing placeholder '' characters with random hex digits.
MC_RTC_UTILS_DLLAPI std::string make_temporary_path(const std::string &prefix)
Creates a unique temporary directory path with the given prefix.
MC_RTC_UTILS_DLLAPI std::string filename(const fs::path &path, bool keepExtension=false)
#define MC_RTC_UTILS_DLLAPI
Definition: utils_api.h:50