diff --git a/loader/include/Geode/utils/file.hpp b/loader/include/Geode/utils/file.hpp index 5e14208c..52a3afdc 100644 --- a/loader/include/Geode/utils/file.hpp +++ b/loader/include/Geode/utils/file.hpp @@ -29,9 +29,13 @@ namespace geode::utils::file { GEODE_DLL Result<> createDirectory(ghc::filesystem::path const& path); GEODE_DLL Result<> createDirectoryAll(ghc::filesystem::path const& path); + [[deprecated("Use file::readDirectory")]] GEODE_DLL Result> listFiles( ghc::filesystem::path const& path, bool recursive = false ); + GEODE_DLL Result> readDirectory( + ghc::filesystem::path const& path, bool recursive = false + ); class Unzip; diff --git a/loader/src/utils/file.cpp b/loader/src/utils/file.cpp index c6f12b65..22f13908 100644 --- a/loader/src/utils/file.cpp +++ b/loader/src/utils/file.cpp @@ -116,6 +116,12 @@ Result<> utils::file::createDirectoryAll(ghc::filesystem::path const& path) { Result> utils::file::listFiles( ghc::filesystem::path const& path, bool recursive +) { + return file::readDirectory(path, recursive); +} + +Result> utils::file::readDirectory( + ghc::filesystem::path const& path, bool recursive ) { if (!ghc::filesystem::exists(path)) { return Err("Directory does not exist");