Use filesystem
This commit is contained in:
parent
151f438dde
commit
3ed371dd36
|
@ -7,6 +7,9 @@
|
|||
#include "obj_types.h"
|
||||
#include "proto_types.h"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
typedef enum Head {
|
||||
HEAD_INVALID,
|
||||
HEAD_MARCUS,
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
// 0x5108C0
|
||||
AudioFileIsCompressedProc* _queryCompressedFunc_2 = _defaultCompressionFunc__;
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <zlib.h>
|
||||
#include <fstream>
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
// 0x452740
|
||||
int fileCopyDecompressed(const char* existingFilePath, const char* newFilePath)
|
||||
|
@ -142,8 +143,6 @@ int _gzdecompress_file(const char* existingFilePath, const char* newFilePath)
|
|||
|
||||
void fileCopy(const char* existingFilePath, const char* newFilePath)
|
||||
{
|
||||
std::ifstream source { existingFilePath, std::ios::binary };
|
||||
std::ofstream destination { newFilePath, std::ios::binary };
|
||||
|
||||
destination << source.rdbuf();
|
||||
std::error_code ec;
|
||||
std::filesystem::copy_file(std::filesystem::path(existingFilePath), std::filesystem::path(newFilePath), ec);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue