1515namespace RAYX {
1616
1717// Check if a file exists
18- bool fileExists (const std::string& path) { return std::filesystem::exists (path); }
19- bool fileExists (const std::filesystem::path& path) { return std::filesystem::exists (path); }
18+ bool ResourceFinder:: fileExists (const std::string& path) { return std::filesystem::exists (path); }
19+ bool ResourceFinder:: fileExists (const std::filesystem::path& path) { return std::filesystem::exists (path); }
2020
21- std::filesystem::path getExecutablePath () {
21+ std::filesystem::path ResourceFinder:: getExecutablePath () {
2222#if defined(_WIN32)
2323 // Start with a reasonable buffer size
2424 std::vector<char > buffer (MAX_PATH);
@@ -59,7 +59,7 @@ std::filesystem::path getExecutablePath() {
5959}
6060
6161// General method to get the full path based on the base directory (e.g., data or font directory)
62- std::filesystem::path getFullPath (const std::string& baseDir, const std::string& relativePath) {
62+ std::filesystem::path ResourceFinder:: getFullPath (const std::string& baseDir, const std::string& relativePath) {
6363#if defined(__linux__)
6464 // First, check in /usr (package install)
6565 std::string path = std::string (" /usr/" ) + baseDir + " /" + relativePath;
@@ -89,9 +89,9 @@ std::filesystem::path getFullPath(const std::string& baseDir, const std::string&
8989}
9090
9191// Retrieve the full path of a resource based on the platform
92- std::filesystem::path getResourcePath (const std::string& relativePath) { return getFullPath (RAYX_DATA_DIR, relativePath); }
92+ std::filesystem::path ResourceFinder:: getResourcePath (const std::string& relativePath) { return getFullPath (RAYX_DATA_DIR, relativePath); }
9393
9494// Retrieve the full path of a font based on the platform
95- std::filesystem::path getFontPath (const std::string& relativePath) { return getFullPath (RAYX_FONTS_DIR, relativePath); }
95+ std::filesystem::path ResourceFinder:: getFontPath (const std::string& relativePath) { return getFullPath (RAYX_FONTS_DIR, relativePath); }
9696
9797} // namespace RAYX
0 commit comments