2018-07-28 01:14:03 +03:00
|
|
|
// Copyright 2018 yuzu emulator team
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "core/file_sys/vfs.h"
|
|
|
|
|
|
|
|
namespace FileSys {
|
|
|
|
|
2018-09-24 04:50:16 +03:00
|
|
|
enum class RomFSExtractionType {
|
2018-12-25 00:18:28 +03:00
|
|
|
Full, // Includes data directory
|
|
|
|
Truncated, // Traverses into data directory
|
|
|
|
SingleDiscard, // Traverses into the first subdirectory of root
|
2018-09-24 04:50:16 +03:00
|
|
|
};
|
|
|
|
|
2018-07-28 01:14:03 +03:00
|
|
|
// Converts a RomFS binary blob to VFS Filesystem
|
|
|
|
// Returns nullptr on failure
|
2018-09-24 04:50:16 +03:00
|
|
|
VirtualDir ExtractRomFS(VirtualFile file,
|
|
|
|
RomFSExtractionType type = RomFSExtractionType::Truncated);
|
2018-09-20 05:04:51 +03:00
|
|
|
|
|
|
|
// Converts a VFS filesystem into a RomFS binary
|
|
|
|
// Returns nullptr on failure
|
2018-10-02 15:56:56 +03:00
|
|
|
VirtualFile CreateRomFS(VirtualDir dir, VirtualDir ext = nullptr);
|
2018-07-28 01:14:03 +03:00
|
|
|
|
|
|
|
} // namespace FileSys
|