Files
dolphin/Source/Core/DiscIO/FileSystemGCWii.h
T

51 lines
1.5 KiB
C++
Raw Normal View History

// Copyright 2008 Dolphin Emulator Project
2015-05-18 01:08:10 +02:00
// Licensed under GPLv2+
// Refer to the license.txt file included.
2008-12-08 04:46:09 +00:00
#pragma once
2008-12-08 04:46:09 +00:00
#include <cstddef>
#include <string>
2008-12-08 04:46:09 +00:00
#include <vector>
#include "Common/CommonTypes.h"
2014-02-17 05:18:15 -05:00
#include "DiscIO/Filesystem.h"
2008-12-08 04:46:09 +00:00
namespace DiscIO
{
class IVolume;
2008-12-08 04:46:09 +00:00
class CFileSystemGCWii : public IFileSystem
{
public:
2013-03-03 16:51:26 -06:00
CFileSystemGCWii(const IVolume* _rVolume);
2008-12-08 04:46:09 +00:00
virtual ~CFileSystemGCWii();
2015-07-30 06:47:02 -04:00
bool IsValid() const override { return m_Valid; }
u64 GetFileSize(const std::string& _rFullPath) override;
const std::vector<SFileInfo>& GetFileList() override;
const std::string GetFileName(u64 _Address) override;
u64 ReadFile(const std::string& _rFullPath, u8* _pBuffer, u64 _MaxBufferSize, u64 _OffsetInFile) override;
bool ExportFile(const std::string& _rFullPath, const std::string&_rExportFilename) override;
bool ExportApploader(const std::string& _rExportFolder) const override;
bool ExportDOL(const std::string& _rExportFolder) const override;
u32 GetBootDOLSize() const override;
u32 GetBootDOLSize(u64 dol_offset) const override;
2008-12-08 04:46:09 +00:00
2009-07-03 03:26:23 +00:00
private:
2008-12-08 04:46:09 +00:00
bool m_Initialized;
2010-06-03 20:59:55 +00:00
bool m_Valid;
bool m_Wii;
2015-05-03 11:39:20 +02:00
std::vector<SFileInfo> m_FileInfoVector;
2013-03-03 16:51:26 -06:00
std::string GetStringFromOffset(u64 _Offset) const;
2014-03-12 15:33:41 -04:00
const SFileInfo* FindFileInfo(const std::string& _rFullPath);
bool DetectFileSystem();
void InitFileSystem();
size_t BuildFilenames(const size_t _FirstIndex, const size_t _LastIndex, const std::string& _szDirectory, u64 _NameTableOffset);
u32 GetOffsetShift() const;
2008-12-08 04:46:09 +00:00
};
} // namespace