Removing utilities (that were just adding needless layers).

Progress on #294.
This commit is contained in:
Ben Vanik
2015-06-27 16:27:24 -07:00
parent 246c47f923
commit abf47b7973
17 changed files with 125 additions and 217 deletions

View File

@@ -15,44 +15,28 @@
#include <unordered_map>
#include <vector>
#include "xenia/vfs/device.h"
#include "xenia/vfs/entry.h"
namespace xe {
namespace vfs {
class Device;
enum class FileSystemType {
STFS_TITLE,
DISC_IMAGE,
XEX_FILE,
};
class VirtualFileSystem {
public:
VirtualFileSystem();
~VirtualFileSystem();
FileSystemType InferType(const std::wstring& local_path);
int InitializeFromPath(FileSystemType type, const std::wstring& local_path);
bool RegisterDevice(std::unique_ptr<Device> device);
int RegisterDevice(const std::string& path, Device* device);
int RegisterHostPathDevice(const std::string& path,
const std::wstring& local_path, bool read_only);
int RegisterDiscImageDevice(const std::string& path,
const std::wstring& local_path);
int RegisterSTFSContainerDevice(const std::string& path,
const std::wstring& local_path);
int CreateSymbolicLink(const std::string& path, const std::string& target);
int DeleteSymbolicLink(const std::string& path);
bool RegisterSymbolicLink(std::string path, std::string target);
bool UnregisterSymbolicLink(std::string path);
std::unique_ptr<Entry> ResolvePath(const std::string& path);
X_STATUS Open(std::unique_ptr<Entry> entry, KernelState* kernel_state,
Mode mode, bool async, XFile** out_file);
private:
std::vector<Device*> devices_;
std::vector<std::unique_ptr<Device>> devices_;
std::unordered_map<std::string, std::string> symlinks_;
};