diff --git a/src/lib/io/Filesystem.cpp b/src/lib/io/Filesystem.cpp index 96d4328b0..96beea197 100644 --- a/src/lib/io/Filesystem.cpp +++ b/src/lib/io/Filesystem.cpp @@ -7,34 +7,8 @@ #include "Filesystem.h" -#include - namespace deskflow { -namespace { - -template void openUtf8PathImpl(Stream &stream, const fs::path &path, std::ios_base::openmode mode) -{ - stream.open(path.native().c_str(), mode); -} - -} // namespace - -void openUtf8Path(std::ifstream &stream, const fs::path &path, std::ios_base::openmode mode) -{ - openUtf8PathImpl(stream, path, mode); -} - -void openUtf8Path(std::ofstream &stream, const fs::path &path, std::ios_base::openmode mode) -{ - openUtf8PathImpl(stream, path, mode); -} - -void openUtf8Path(std::fstream &stream, const fs::path &path, std::ios_base::openmode mode) -{ - openUtf8PathImpl(stream, path, mode); -} - std::FILE *fopenUtf8Path(const fs::path &path, const std::string &mode) { #if SYSAPI_WIN32 diff --git a/src/lib/io/Filesystem.h b/src/lib/io/Filesystem.h index 96ddecff2..502562eec 100644 --- a/src/lib/io/Filesystem.h +++ b/src/lib/io/Filesystem.h @@ -9,19 +9,11 @@ #include #include -#include -#include namespace deskflow { namespace fs = std::filesystem; -void openUtf8Path(std::ifstream &stream, const fs::path &path, std::ios_base::openmode mode = std::ios_base::in); -void openUtf8Path(std::ofstream &stream, const fs::path &path, std::ios_base::openmode mode = std::ios_base::out); -void openUtf8Path( - std::fstream &stream, const fs::path &path, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out -); - std::FILE *fopenUtf8Path(const fs::path &path, const std::string &mode); } // namespace deskflow