diff --git a/src/fileutils.cpp b/src/fileutils.cpp index 335da58034c5bd883f565c938e628d7ddda08e18..b1b0b7ff6ef4a94ba51c5d355c3d0eb864cbecac 100644 --- a/src/fileutils.cpp +++ b/src/fileutils.cpp @@ -358,46 +358,6 @@ removeAll(const std::filesystem::path& path, bool erase) } } -void -openStream(std::ifstream& file, const std::filesystem::path& path, std::ios_base::openmode mode) -{ -#ifdef _WIN32 - file.open(dhtnet::to_wstring(path.string()), mode); -#else - file.open(path, mode); -#endif -} - -void -openStream(std::ofstream& file, const std::filesystem::path& path, std::ios_base::openmode mode) -{ -#ifdef _WIN32 - file.open(dhtnet::to_wstring(path.string()), mode); -#else - file.open(path, mode); -#endif -} - -std::ifstream -ifstream(const std::filesystem::path& path, std::ios_base::openmode mode) -{ -#ifdef _WIN32 - return std::ifstream(dhtnet::to_wstring(path.string()), mode); -#else - return std::ifstream(path, mode); -#endif -} - -std::ofstream -ofstream(const std::filesystem::path& path, std::ios_base::openmode mode) -{ -#ifdef _WIN32 - return std::ofstream(dhtnet::to_wstring(path.string()), mode); -#else - return std::ofstream(path, mode); -#endif -} - int accessFile(const std::filesystem::path& file, int mode) {