- 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
1.1 KiB
C++
30 lines
1.1 KiB
C++
#pragma once
|
|
#include "PlatformTypes.h"
|
|
|
|
namespace XCEngine {
|
|
namespace Platform {
|
|
|
|
class IFileSystem {
|
|
public:
|
|
virtual ~IFileSystem() = default;
|
|
|
|
virtual bool FileExists(const char* path) const = 0;
|
|
virtual bool DirectoryExists(const char* path) const = 0;
|
|
virtual int64_t GetFileSize(const char* path) const = 0;
|
|
virtual bool DeleteFile(const char* path) = 0;
|
|
virtual bool CreateDirectory(const char* path) = 0;
|
|
|
|
virtual std::unique_ptr<uint8_t[]> ReadFile(const char* path, size_t* outSize) const = 0;
|
|
virtual bool WriteFile(const char* path, const void* data, size_t size) = 0;
|
|
|
|
virtual Containers::String GetExecutablePath() const = 0;
|
|
virtual Containers::String GetWorkingDirectory() const = 0;
|
|
virtual Containers::String GetUserDirectory() const = 0;
|
|
virtual Containers::String GetTempDirectory() const = 0;
|
|
|
|
virtual Containers::String NormalizePath(const Containers::String& path) const = 0;
|
|
virtual Containers::String CombinePaths(const Containers::String& base, const Containers::String& relative) const = 0;
|
|
};
|
|
|
|
} // namespace Platform
|
|
} // namespace XCEngine
|