aboutsummaryrefslogtreecommitdiff
path: root/backends/fs
diff options
context:
space:
mode:
authorMax Horn2009-01-23 03:41:36 +0000
committerMax Horn2009-01-23 03:41:36 +0000
commit8f16458e9ba830fe80f177cc2fc3bcf2af84ebef (patch)
tree36236e2af1589bca848ce28d7606ef6e789431e8 /backends/fs
parente4b013f616818f6da4cf7a1896f31d1429ef8f04 (diff)
downloadscummvm-rg350-8f16458e9ba830fe80f177cc2fc3bcf2af84ebef.tar.gz
scummvm-rg350-8f16458e9ba830fe80f177cc2fc3bcf2af84ebef.tar.bz2
scummvm-rg350-8f16458e9ba830fe80f177cc2fc3bcf2af84ebef.zip
Renamed FSNode::openForReading / openForWriting to createReadStream / createWriteStream, again to make ownership of the returned stream clear
svn-id: r36014
Diffstat (limited to 'backends/fs')
-rw-r--r--backends/fs/abstract-fs.h6
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.cpp8
-rw-r--r--backends/fs/ds/ds-fs.cpp8
-rw-r--r--backends/fs/ds/ds-fs.h8
-rw-r--r--backends/fs/palmos/palmos-fs.cpp8
-rw-r--r--backends/fs/posix/posix-fs.cpp4
-rw-r--r--backends/fs/posix/posix-fs.h4
-rw-r--r--backends/fs/ps2/ps2-fs.cpp8
-rw-r--r--backends/fs/psp/psp-fs.cpp8
-rw-r--r--backends/fs/symbian/symbian-fs.cpp8
-rw-r--r--backends/fs/wii/wii-fs.cpp8
-rw-r--r--backends/fs/windows/windows-fs.cpp8
12 files changed, 43 insertions, 43 deletions
diff --git a/backends/fs/abstract-fs.h b/backends/fs/abstract-fs.h
index 68478ea8a4..604d6e2000 100644
--- a/backends/fs/abstract-fs.h
+++ b/backends/fs/abstract-fs.h
@@ -52,7 +52,7 @@ protected:
* When called with a name not matching any of the files/dirs contained in this
* directory, a valid node shold be returned, which returns 'false' upon calling
* the exists() method. The idea is that this node can then still can be used to
- * create a new file via the openForWriting() method.
+ * create a new file via the createWriteStream() method.
*
* Example:
* Calling getChild() for a node with path "/foo/bar" using name="file.txt",
@@ -169,7 +169,7 @@ public:
*
* @return pointer to the stream object, 0 in case of a failure
*/
- virtual Common::SeekableReadStream *openForReading() = 0;
+ virtual Common::SeekableReadStream *createReadStream() = 0;
/**
* Creates a WriteStream instance corresponding to the file
@@ -178,7 +178,7 @@ public:
*
* @return pointer to the stream object, 0 in case of a failure
*/
- virtual Common::WriteStream *openForWriting() = 0;
+ virtual Common::WriteStream *createWriteStream() = 0;
};
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index 3b8d7b635c..d6ae719695 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -107,8 +107,8 @@ public:
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFSNode *getParent() const;
- virtual Common::SeekableReadStream *openForReading();
- virtual Common::WriteStream *openForWriting();
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
/**
* Creates a list with all the volumes present in the root node.
@@ -569,11 +569,11 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const {
return myList;
}
-Common::SeekableReadStream *AmigaOSFilesystemNode::openForReading() {
+Common::SeekableReadStream *AmigaOSFilesystemNode::createReadStream() {
return StdioStream::makeFromPath(getPath().c_str(), false);
}
-Common::WriteStream *AmigaOSFilesystemNode::openForWriting() {
+Common::WriteStream *AmigaOSFilesystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath().c_str(), true);
}
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp
index 3ab1c90038..79f10fdb62 100644
--- a/backends/fs/ds/ds-fs.cpp
+++ b/backends/fs/ds/ds-fs.cpp
@@ -196,11 +196,11 @@ AbstractFSNode* DSFileSystemNode::getParent() const {
return p;
}
-Common::SeekableReadStream *DSFileSystemNode::openForReading() {
+Common::SeekableReadStream *DSFileSystemNode::createReadStream() {
return StdioStream::makeFromPath(getPath().c_str(), false);
}
-Common::WriteStream *DSFileSystemNode::openForWriting() {
+Common::WriteStream *DSFileSystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath().c_str(), true);
}
@@ -372,7 +372,7 @@ AbstractFSNode* GBAMPFileSystemNode::getParent() const {
return p;
}
-Common::SeekableReadStream *GBAMPFileSystemNode::openForReading() {
+Common::SeekableReadStream *GBAMPFileSystemNode::createReadStream() {
// consolePrintf("Opening: %s\n", getPath().c_str());
if (!strncmp(getPath().c_str(), "mp:/", 4)) {
@@ -382,7 +382,7 @@ Common::SeekableReadStream *GBAMPFileSystemNode::openForReading() {
}
}
-Common::WriteStream *GBAMPFileSystemNode::openForWriting() {
+Common::WriteStream *GBAMPFileSystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath().c_str(), true);
}
diff --git a/backends/fs/ds/ds-fs.h b/backends/fs/ds/ds-fs.h
index 24d51d9d71..beea422a14 100644
--- a/backends/fs/ds/ds-fs.h
+++ b/backends/fs/ds/ds-fs.h
@@ -90,8 +90,8 @@ public:
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFSNode *getParent() const;
- virtual Common::SeekableReadStream *openForReading();
- virtual Common::WriteStream *openForWriting();
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
/**
* Returns the zip file this node points to.
@@ -155,8 +155,8 @@ public:
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFSNode *getParent() const;
- virtual Common::SeekableReadStream *openForReading();
- virtual Common::WriteStream *openForWriting();
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
};
struct fileHandle {
diff --git a/backends/fs/palmos/palmos-fs.cpp b/backends/fs/palmos/palmos-fs.cpp
index b828213817..e8b924e1fc 100644
--- a/backends/fs/palmos/palmos-fs.cpp
+++ b/backends/fs/palmos/palmos-fs.cpp
@@ -68,8 +68,8 @@ public:
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFSNode *getParent() const;
- virtual Common::SeekableReadStream *openForReading();
- virtual Common::WriteStream *openForWriting();
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
private:
/**
@@ -208,11 +208,11 @@ AbstractFSNode *PalmOSFilesystemNode::getParent() const {
return p;
}
-Common::SeekableReadStream *PalmOSFilesystemNode::openForReading() {
+Common::SeekableReadStream *PalmOSFilesystemNode::createReadStream() {
return StdioStream::makeFromPath(getPath().c_str(), false);
}
-Common::WriteStream *PalmOSFilesystemNode::openForWriting() {
+Common::WriteStream *PalmOSFilesystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath().c_str(), true);
}
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index 446ded779d..b218e9dd59 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -237,11 +237,11 @@ AbstractFSNode *POSIXFilesystemNode::getParent() const {
return makeNode(Common::String(start, end));
}
-Common::SeekableReadStream *POSIXFilesystemNode::openForReading() {
+Common::SeekableReadStream *POSIXFilesystemNode::createReadStream() {
return StdioStream::makeFromPath(getPath().c_str(), false);
}
-Common::WriteStream *POSIXFilesystemNode::openForWriting() {
+Common::WriteStream *POSIXFilesystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath().c_str(), true);
}
diff --git a/backends/fs/posix/posix-fs.h b/backends/fs/posix/posix-fs.h
index 8050f52b41..859e8973b3 100644
--- a/backends/fs/posix/posix-fs.h
+++ b/backends/fs/posix/posix-fs.h
@@ -73,8 +73,8 @@ public:
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFSNode *getParent() const;
- virtual Common::SeekableReadStream *openForReading();
- virtual Common::WriteStream *openForWriting();
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
private:
/**
diff --git a/backends/fs/ps2/ps2-fs.cpp b/backends/fs/ps2/ps2-fs.cpp
index 5246a9bd38..a8dcb4d2bb 100644
--- a/backends/fs/ps2/ps2-fs.cpp
+++ b/backends/fs/ps2/ps2-fs.cpp
@@ -100,8 +100,8 @@ public:
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFSNode *getParent() const;
- virtual Common::SeekableReadStream *openForReading();
- virtual Common::WriteStream *openForWriting();
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
};
Ps2FilesystemNode::Ps2FilesystemNode() {
@@ -341,10 +341,10 @@ char *Ps2FilesystemNode::getDeviceDescription(const char *path) const {
return "Harddisk";
}
-Common::SeekableReadStream *Ps2FilesystemNode::openForReading() {
+Common::SeekableReadStream *Ps2FilesystemNode::createReadStream() {
return StdioStream::makeFromPath(getPath().c_str(), false);
}
-Common::WriteStream *Ps2FilesystemNode::openForWriting() {
+Common::WriteStream *Ps2FilesystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath().c_str(), true);
}
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp
index bf08fdd2c6..5c6727d878 100644
--- a/backends/fs/psp/psp-fs.cpp
+++ b/backends/fs/psp/psp-fs.cpp
@@ -71,8 +71,8 @@ public:
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFSNode *getParent() const;
- virtual Common::SeekableReadStream *openForReading();
- virtual Common::WriteStream *openForWriting();
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
};
PSPFilesystemNode::PSPFilesystemNode() {
@@ -161,11 +161,11 @@ AbstractFSNode *PSPFilesystemNode::getParent() const {
return new PSPFilesystemNode(Common::String(start, end - start), false);
}
-Common::SeekableReadStream *PSPFilesystemNode::openForReading() {
+Common::SeekableReadStream *PSPFilesystemNode::createReadStream() {
return StdioStream::makeFromPath(getPath().c_str(), false);
}
-Common::WriteStream *PSPFilesystemNode::openForWriting() {
+Common::WriteStream *PSPFilesystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath().c_str(), true);
}
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp
index 3b57ac0356..edb44d9ba9 100644
--- a/backends/fs/symbian/symbian-fs.cpp
+++ b/backends/fs/symbian/symbian-fs.cpp
@@ -79,8 +79,8 @@ public:
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFSNode *getParent() const;
- virtual Common::SeekableReadStream *openForReading();
- virtual Common::WriteStream *openForWriting();
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
};
/**
@@ -252,11 +252,11 @@ AbstractFSNode *SymbianFilesystemNode::getParent() const {
return p;
}
-Common::SeekableReadStream *SymbianFilesystemNode::openForReading() {
+Common::SeekableReadStream *SymbianFilesystemNode::createReadStream() {
return SymbianStdioStream::makeFromPath(getPath().c_str(), false);
}
-Common::WriteStream *SymbianFilesystemNode::openForWriting() {
+Common::WriteStream *SymbianFilesystemNode::createWriteStream() {
return SymbianStdioStream::makeFromPath(getPath().c_str(), true);
}
#endif //#if defined (__SYMBIAN32__)
diff --git a/backends/fs/wii/wii-fs.cpp b/backends/fs/wii/wii-fs.cpp
index dac336f032..7a144cddbf 100644
--- a/backends/fs/wii/wii-fs.cpp
+++ b/backends/fs/wii/wii-fs.cpp
@@ -79,8 +79,8 @@ public:
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFSNode *getParent() const;
- virtual Common::SeekableReadStream *openForReading();
- virtual Common::WriteStream *openForWriting();
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
static void asyncHandler(bool umount, const Common::String *path);
};
@@ -290,11 +290,11 @@ AbstractFSNode *WiiFilesystemNode::getParent() const {
return new WiiFilesystemNode(Common::String(start, end - start));
}
-Common::SeekableReadStream *WiiFilesystemNode::openForReading() {
+Common::SeekableReadStream *WiiFilesystemNode::createReadStream() {
return StdioStream::makeFromPath(getPath().c_str(), false);
}
-Common::WriteStream *WiiFilesystemNode::openForWriting() {
+Common::WriteStream *WiiFilesystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath().c_str(), true);
}
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp
index 9732efdb6d..00f72773c3 100644
--- a/backends/fs/windows/windows-fs.cpp
+++ b/backends/fs/windows/windows-fs.cpp
@@ -102,8 +102,8 @@ public:
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFSNode *getParent() const;
- virtual Common::SeekableReadStream *openForReading();
- virtual Common::WriteStream *openForWriting();
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
private:
/**
@@ -313,11 +313,11 @@ AbstractFSNode *WindowsFilesystemNode::getParent() const {
return p;
}
-Common::SeekableReadStream *WindowsFilesystemNode::openForReading() {
+Common::SeekableReadStream *WindowsFilesystemNode::createReadStream() {
return StdioStream::makeFromPath(getPath().c_str(), false);
}
-Common::WriteStream *WindowsFilesystemNode::openForWriting() {
+Common::WriteStream *WindowsFilesystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath().c_str(), true);
}