aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/windows
diff options
context:
space:
mode:
authorMax Horn2008-09-03 12:56:46 +0000
committerMax Horn2008-09-03 12:56:46 +0000
commit7f18aaf8ec92a7ec7cd837db92b93dfada87eef3 (patch)
treee1510dfc5cd2b50b0d77c5a384307174687c4116 /backends/fs/windows
parent320a5dc99fa416d63a5fb8ec63c07463c80dc633 (diff)
downloadscummvm-rg350-7f18aaf8ec92a7ec7cd837db92b93dfada87eef3.tar.gz
scummvm-rg350-7f18aaf8ec92a7ec7cd837db92b93dfada87eef3.tar.bz2
scummvm-rg350-7f18aaf8ec92a7ec7cd837db92b93dfada87eef3.zip
Pushed AbstractFilesystemNode::openForReading() / openForWriting() impls out to backends
svn-id: r34304
Diffstat (limited to 'backends/fs/windows')
-rw-r--r--backends/fs/windows/windows-fs.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp
index 5d8c2f009c..c59c7dbe71 100644
--- a/backends/fs/windows/windows-fs.cpp
+++ b/backends/fs/windows/windows-fs.cpp
@@ -31,6 +31,7 @@
#undef GetCurrentDirectory
#endif
#include "backends/fs/abstract-fs.h"
+#include "backends/fs/stdiostream.h"
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
@@ -98,6 +99,9 @@ public:
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
+ virtual Common::SeekableReadStream *openForReading();
+ virtual Common::WriteStream *openForWriting();
+
private:
/**
* Adds a single WindowsFilesystemNode to a given list.
@@ -303,4 +307,12 @@ AbstractFilesystemNode *WindowsFilesystemNode::getParent() const {
return p;
}
+Common::SeekableReadStream *WindowsFilesystemNode::openForReading() {
+ return StdioStream::makeFromPath(getPath().c_str(), false);
+}
+
+Common::WriteStream *WindowsFilesystemNode::openForWriting() {
+ return StdioStream::makeFromPath(getPath().c_str(), true);
+}
+
#endif //#ifdef WIN32