nuke non-portable Windows file operations

This commit is contained in:
Tropical
2026-04-10 17:04:46 -05:00
parent 05adecade7
commit ff7baaac3b
4 changed files with 0 additions and 22 deletions

View File

@@ -49,13 +49,9 @@ bool FileSeek(std::FILE* file, int64_t offset, int origin) {
// SecurityException - if a security manager exists and its checkRead method
// denies read access to the file.
FileInputStream::FileInputStream(const File& file) : m_fileHandle(nullptr) {
#if defined(_WIN32)
m_fileHandle = _wfopen(file.getPath().c_str(), "rb");
#else
const std::string nativePath =
std::filesystem::path(file.getPath()).string();
m_fileHandle = std::fopen(nativePath.c_str(), "rb");
#endif
if (m_fileHandle == nullptr) {
assert(0);

View File

@@ -26,13 +26,9 @@ FileOutputStream::FileOutputStream(const File& file) : m_fileHandle(nullptr) {
return;
}
#if defined(_WIN32)
m_fileHandle = _wfopen(file.getPath().c_str(), "wb");
#else
const std::string nativePath =
std::filesystem::path(file.getPath()).string();
m_fileHandle = std::fopen(nativePath.c_str(), "wb");
#endif
if (m_fileHandle == nullptr) {
// TODO 4J Stu - Any form of error/exception handling