2023-05-08 14:43:33 +02:00
|
|
|
// SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
|
|
|
|
|
// This code is part of the sfizz library and is licensed under a BSD 2-clause
|
|
|
|
|
// license. You should have receive a LICENSE.md file along with the code.
|
|
|
|
|
// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
#include <ghc/fs_std.hpp>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#if defined(_WIN32)
|
|
|
|
|
#include <cwchar>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
const fs::path& getUserDocumentsDirectory();
|
|
|
|
|
|
2023-12-06 22:23:19 +01:00
|
|
|
const fs::path toPlatformAgnosticPath(const std::string& filePath);
|
2023-09-21 00:43:39 +09:00
|
|
|
const fs::path fromPlatformAgnosticPath(const char *filePath);
|
|
|
|
|
|
2023-05-08 14:43:33 +02:00
|
|
|
#if !defined(_WIN32) && !defined(__APPLE__)
|
|
|
|
|
const fs::path& getUserHomeDirectory();
|
|
|
|
|
const fs::path& getXdgConfigHome();
|
|
|
|
|
struct XdgUserDirsEntry { std::string name; fs::path value; };
|
|
|
|
|
std::vector<XdgUserDirsEntry> parseXdgUserDirs(const fs::path& userDirsPath);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if defined(_WIN32)
|
|
|
|
|
wchar_t *stringToWideChar(const char *str, int strCch = -1);
|
|
|
|
|
char* stringToUTF8(const wchar_t *strW, int strWCch = -1);
|
|
|
|
|
#endif
|