Adding locks and parents to vfs.

Progress on #305.
This commit is contained in:
Ben Vanik
2015-06-29 05:07:29 -07:00
parent 9a80b5e5be
commit 0104a2290f
16 changed files with 65 additions and 40 deletions

View File

@@ -13,6 +13,7 @@
#include <memory>
#include <string>
#include "xenia/base/mutex.h"
#include "xenia/base/string_buffer.h"
#include "xenia/vfs/entry.h"
@@ -27,11 +28,12 @@ class Device {
virtual bool Initialize() = 0;
void Dump(StringBuffer* string_buffer);
xe::mutex& mutex() { return mutex_; }
const std::string& mount_path() const { return mount_path_; }
virtual bool is_read_only() const { return true; }
Entry* ResolvePath(const char* path);
Entry* ResolvePath(std::string path);
virtual uint32_t total_allocation_units() const = 0;
virtual uint32_t available_allocation_units() const = 0;
@@ -39,6 +41,7 @@ class Device {
virtual uint32_t bytes_per_sector() const = 0;
protected:
xe::mutex mutex_;
std::string mount_path_;
std::unique_ptr<Entry> root_entry_;
};