- TEST_SPEC.md: Updated test directory structure to reflect Core/Asset, Core/IO, and Resources/<Type> subdirectories - TEST_SPEC.md: Updated module names and test counts (852 total) - TEST_SPEC.md: Updated build commands for new Resources subdirectories - README.md: Updated engine structure with Core/Asset/ and Core/IO/ - README.md: Updated Resources section with layered architecture - README.md: Updated test coverage table with accurate counts
30 lines
573 B
C++
30 lines
573 B
C++
#pragma once
|
|
|
|
#include <XCEngine/Core/Containers/String.h>
|
|
#include <cstdio>
|
|
|
|
namespace XCEngine {
|
|
namespace Core {
|
|
|
|
class FileWriter {
|
|
public:
|
|
FileWriter();
|
|
FileWriter(const char* filePath, bool append = false);
|
|
~FileWriter();
|
|
|
|
bool Open(const char* filePath, bool append = false);
|
|
void Close();
|
|
|
|
bool Write(const char* data, size_t length);
|
|
bool Write(const Containers::String& str);
|
|
bool Flush();
|
|
|
|
bool IsOpen() const { return m_file != nullptr; }
|
|
|
|
private:
|
|
FILE* m_file = nullptr;
|
|
};
|
|
|
|
} // namespace Core
|
|
} // namespace XCEngine
|