2013-01-31 21:27:00 +00:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
* Xenia : Xbox 360 Emulator Research Project *
|
|
|
|
******************************************************************************
|
|
|
|
* Copyright 2013 Ben Vanik. All rights reserved. *
|
|
|
|
* Released under the BSD license - see LICENSE in the root for more details. *
|
|
|
|
******************************************************************************
|
|
|
|
*/
|
|
|
|
|
2013-10-16 06:09:51 +00:00
|
|
|
#ifndef XENIA_KERNEL_MODULES_XBOXKRNL_FS_FILESYSTEM_H_
|
|
|
|
#define XENIA_KERNEL_MODULES_XBOXKRNL_FS_FILESYSTEM_H_
|
2013-01-31 21:27:00 +00:00
|
|
|
|
|
|
|
#include <xenia/common.h>
|
|
|
|
#include <xenia/core.h>
|
|
|
|
|
2013-02-01 00:52:50 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2013-10-16 06:09:51 +00:00
|
|
|
#include <xenia/kernel/modules/xboxkrnl/fs/entry.h>
|
2013-01-31 21:27:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace xe {
|
|
|
|
namespace kernel {
|
2013-10-16 06:09:51 +00:00
|
|
|
namespace xboxkrnl {
|
2013-01-31 21:27:00 +00:00
|
|
|
namespace fs {
|
|
|
|
|
|
|
|
|
|
|
|
class Device;
|
|
|
|
|
|
|
|
|
|
|
|
class FileSystem {
|
|
|
|
public:
|
2013-03-29 12:07:32 +00:00
|
|
|
FileSystem();
|
2013-01-31 21:27:00 +00:00
|
|
|
~FileSystem();
|
|
|
|
|
|
|
|
int RegisterDevice(const char* path, Device* device);
|
|
|
|
int RegisterLocalDirectoryDevice(const char* path,
|
|
|
|
const xechar_t* local_path);
|
|
|
|
int RegisterDiscImageDevice(const char* path, const xechar_t* local_path);
|
|
|
|
|
|
|
|
int CreateSymbolicLink(const char* path, const char* target);
|
|
|
|
int DeleteSymbolicLink(const char* path);
|
|
|
|
|
|
|
|
Entry* ResolvePath(const char* path);
|
|
|
|
|
|
|
|
private:
|
2013-02-01 00:52:50 +00:00
|
|
|
std::vector<Device*> devices_;
|
|
|
|
std::tr1::unordered_map<std::string, std::string> symlinks_;
|
2013-01-31 21:27:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace fs
|
2013-10-16 06:09:51 +00:00
|
|
|
} // namespace xboxkrnl
|
2013-01-31 21:27:00 +00:00
|
|
|
} // namespace kernel
|
|
|
|
} // namespace xe
|
|
|
|
|
|
|
|
|
2013-10-16 06:09:51 +00:00
|
|
|
#endif // XENIA_KERNEL_MODULES_XBOXKRNL_FS_FILESYSTEM_H_
|