Added name() and path() to XFile.

This commit is contained in:
gibbed 2014-01-19 00:51:08 -08:00
parent 8b27354dcb
commit 124b419b6b
7 changed files with 36 additions and 0 deletions

View File

@ -28,6 +28,14 @@ DiscImageFile::DiscImageFile(
DiscImageFile::~DiscImageFile() {
}
const char* DiscImageFile::name(void) {
return entry_->name();
}
const char* DiscImageFile::path(void) {
return entry_->path();
}
X_STATUS DiscImageFile::QueryInfo(XFileInfo* out_info) {
return entry_->QueryInfo(out_info);
}

View File

@ -29,6 +29,9 @@ public:
DiscImageEntry* entry);
virtual ~DiscImageFile();
virtual const char* name(void);
virtual const char* path(void);
virtual X_STATUS QueryInfo(XFileInfo* out_info);
virtual X_STATUS QueryDirectory(XDirectoryInfo* out_info,
size_t length, bool restart);

View File

@ -28,6 +28,14 @@ HostPathFile::~HostPathFile() {
CloseHandle(file_handle_);
}
const char* HostPathFile::name(void) {
return entry_->name();
}
const char* HostPathFile::path(void) {
return entry_->path();
}
X_STATUS HostPathFile::QueryInfo(XFileInfo* out_info) {
return entry_->QueryInfo(out_info);
}

View File

@ -29,6 +29,9 @@ public:
HostPathEntry* entry, HANDLE file_handle);
virtual ~HostPathFile();
virtual const char* name(void);
virtual const char* path(void);
virtual X_STATUS QueryInfo(XFileInfo* out_info);
virtual X_STATUS QueryDirectory(XDirectoryInfo* out_info,
size_t length, bool restart);

View File

@ -28,6 +28,14 @@ STFSContainerFile::STFSContainerFile(
STFSContainerFile::~STFSContainerFile() {
}
const char* STFSContainerFile::name(void) {
return entry_->name();
}
const char* STFSContainerFile::path(void) {
return entry_->path();
}
X_STATUS STFSContainerFile::QueryInfo(XFileInfo* out_info) {
return entry_->QueryInfo(out_info);
}

View File

@ -29,6 +29,9 @@ public:
STFSContainerEntry* entry);
virtual ~STFSContainerFile();
virtual const char* name(void);
virtual const char* path(void);
virtual X_STATUS QueryInfo(XFileInfo* out_info);
virtual X_STATUS QueryDirectory(XDirectoryInfo* out_info,
size_t length, bool restart);

View File

@ -87,6 +87,9 @@ class XFile : public XObject {
public:
virtual ~XFile();
virtual const char* name(void) = 0;
virtual const char* path(void) = 0;
size_t position() const { return position_; }
void set_position(size_t value) { position_ = value; }