aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2008-10-03 14:25:03 +0000
committerMax Horn2008-10-03 14:25:03 +0000
commitfe39d4f5075cc723945ca813142d02983069d0d5 (patch)
tree6954dcb3266d70746a5bdaf1bf24ee205acd1671 /backends
parentdf3b8fd14c9ce97fe81976e30086af95000bb2f1 (diff)
parent2219ccf911f3cf9a6d9e5f732e0b6e47d1c8b313 (diff)
downloadscummvm-rg350-fe39d4f5075cc723945ca813142d02983069d0d5.tar.gz
scummvm-rg350-fe39d4f5075cc723945ca813142d02983069d0d5.tar.bz2
scummvm-rg350-fe39d4f5075cc723945ca813142d02983069d0d5.zip
Merged revisions 34656-34661,34663-34664,34671-34672,34674-34676,34678-34686,34688-34689,34691-34698,34700-34705,34707-34713,34715-34722,34725 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk ........ r34656 | eriktorbjorn | 2008-09-27 19:25:40 +0200 (Sa, 27 Sep 2008) | 2 lines Fixed typos. ........ r34657 | eriktorbjorn | 2008-09-27 19:47:22 +0200 (Sa, 27 Sep 2008) | 2 lines Allow quitting or returning to the launcher while cutscenes are playing. ........ r34658 | eriktorbjorn | 2008-09-27 19:51:22 +0200 (Sa, 27 Sep 2008) | 2 lines Slight simplification of last commit. ........ r34659 | fingolfin | 2008-09-27 20:32:01 +0200 (Sa, 27 Sep 2008) | 1 line Modified Common::SearchSet to take signed integer priorities, for convenience (so that one can add archives with less-than-default priority) ........ r34660 | fingolfin | 2008-09-27 20:34:24 +0200 (Sa, 27 Sep 2008) | 1 line Fixed a nasty bug in SearchManager::addDirectory; made the 'char' constructor of Common::String explicit, to avoid such bugs in the future ........ r34661 | drmccoy | 2008-09-27 22:04:04 +0200 (Sa, 27 Sep 2008) | 2 lines Added a spanish floppy version of Lost in Time, as supplied by goodoldgeorg in bug report #2105220 ........ r34663 | fingolfin | 2008-09-28 01:00:46 +0200 (So, 28 Sep 2008) | 1 line Changed Common::File to use SearchMan ........ r34664 | fingolfin | 2008-09-28 01:27:01 +0200 (So, 28 Sep 2008) | 1 line SCUMM: Use FilesystemNode::openForReading instead of Common::File::open(FilesystemNode) in the detector ........ r34671 | john_doe | 2008-09-28 22:02:01 +0200 (So, 28 Sep 2008) | 1 line Return 32000 in sfGetCdTime instead of 0; this fixes the Manhole intro/credits (until the function is actually implemented) ........ r34672 | sev | 2008-09-28 23:07:41 +0200 (So, 28 Sep 2008) | 2 lines Add Italian C64 Zak ........ r34674 | sev | 2008-09-28 23:53:14 +0200 (So, 28 Sep 2008) | 2 lines Fix bug #2043489: DRASCULA: Cannot disable speech ........ r34675 | sev | 2008-09-29 00:07:16 +0200 (Mo, 29 Sep 2008) | 3 lines - Renamed withVoices to _subtitlesDisabled as it reflect the true meaning. - Allowed to disable subtitles from options dialogs including RTL. ........ r34676 | sev | 2008-09-29 00:19:11 +0200 (Mo, 29 Sep 2008) | 2 lines Use better "silence" without clicks when speech is disabled. ........ r34678 | fingolfin | 2008-09-29 12:29:01 +0200 (Mo, 29 Sep 2008) | 1 line Added FIXME to GP2x port ........ r34679 | fingolfin | 2008-09-29 12:30:31 +0200 (Mo, 29 Sep 2008) | 1 line Add priority parameter to the SearchMan API ........ r34680 | fingolfin | 2008-09-29 12:32:06 +0200 (Mo, 29 Sep 2008) | 1 line File::open no longer falls back to searching the current dir (if this causes any regressions, please report them; don't work around them, don't revert this change, without discussing it first) ........ r34681 | fingolfin | 2008-09-29 12:49:36 +0200 (Mo, 29 Sep 2008) | 1 line Don't subclass ArjFile from Common::File (there seems to be no good reason for it). BTW, this code is an abomination and should be replaced by an Archive/SearchSet approach ........ r34682 | fingolfin | 2008-09-29 13:01:25 +0200 (Mo, 29 Sep 2008) | 1 line Added const qualifiers ........ r34683 | fingolfin | 2008-09-29 13:02:11 +0200 (Mo, 29 Sep 2008) | 1 line SCUMM HE: Fixed leak in Win32ResExtractor::extractResource_, use _filename instead of File::name ........ r34684 | fingolfin | 2008-09-29 13:03:10 +0200 (Mo, 29 Sep 2008) | 1 line Added const qualifiers ........ r34685 | fingolfin | 2008-09-29 13:07:39 +0200 (Mo, 29 Sep 2008) | 1 line Don't use File::name() needlessly (i.e. if you still know which file you just opened :) ........ r34686 | cyx | 2008-09-29 21:09:56 +0200 (Mo, 29 Sep 2008) | 1 line add constructor to SearchSet::Node for proper init of structure members with gcc 3.4.x (see tracker items #2120595, #2106292) ........ r34688 | cyx | 2008-09-29 22:08:26 +0200 (Mo, 29 Sep 2008) | 1 line restrict _heXmapNum to HE versions, should fix #2135822 ........ r34689 | eriktorbjorn | 2008-09-29 22:40:58 +0200 (Mo, 29 Sep 2008) | 4 lines Since no one has come up with any better suggestion... this should fix #2123258 ("COMI: Crash after video (SAN) play"). The eos() function won't return true until we've tried to read *past* the end of the stream. ........ r34691 | tanoku | 2008-09-30 00:29:07 +0200 (Di, 30 Sep 2008) | 1 line Ported ZipArchive::getAllNames() implementation from GUI branch. ........ r34692 | fingolfin | 2008-09-30 11:07:03 +0200 (Di, 30 Sep 2008) | 1 line Order alphabetically ........ r34693 | fingolfin | 2008-09-30 11:08:17 +0200 (Di, 30 Sep 2008) | 1 line SAGA: Removed patchesCount from SAGAGameDescription ........ r34694 | fingolfin | 2008-09-30 11:09:39 +0200 (Di, 30 Sep 2008) | 1 line SCUMM HE: Use FilesystemNode::openForReading() instead of 'new Common::File' (didn't cover all instances, though) ........ r34695 | fingolfin | 2008-09-30 11:11:25 +0200 (Di, 30 Sep 2008) | 1 line SAGA: Forgot to commit saga.h ........ r34696 | fingolfin | 2008-09-30 11:12:02 +0200 (Di, 30 Sep 2008) | 1 line Added multiple new open() methods to Common::File, which make it possible to use this class as a generic convenience wrapper around all kinds of SeekableReadStream; also renamed the name() method to the less confusing getName() ........ r34697 | fingolfin | 2008-09-30 13:33:43 +0200 (Di, 30 Sep 2008) | 1 line cleanup ........ r34698 | tanoku | 2008-09-30 13:53:37 +0200 (Di, 30 Sep 2008) | 1 line Fixed functionality of ZipArchive::getAllNames(). Now it expects a possibly non-empty string list and returns the amount of new filenames added to it. ........ r34700 | fingolfin | 2008-09-30 14:27:38 +0200 (Di, 30 Sep 2008) | 1 line Renamed Engine::quit to Engine::shouldQuit (previously, it was easily confused with Engine::quitGame); also cleaned up engine.h a bit ........ r34701 | fingolfin | 2008-09-30 14:37:28 +0200 (Di, 30 Sep 2008) | 1 line cleanup ........ r34702 | fingolfin | 2008-09-30 14:38:44 +0200 (Di, 30 Sep 2008) | 1 line AdvancedDetector: Do not (ab)use paths to keep track of files, rather, use FSNodes -- partial (?) fix for bug #2137680 ........ r34703 | fingolfin | 2008-09-30 14:58:27 +0200 (Di, 30 Sep 2008) | 1 line SAGA: Some code cleanup ........ r34704 | fingolfin | 2008-09-30 14:59:29 +0200 (Di, 30 Sep 2008) | 1 line SKY: Fix detector to not (ab)use FSNode::getPath; if you want to open a FSNode, just pass it to File::open ........ r34705 | thebluegr | 2008-09-30 15:19:14 +0200 (Di, 30 Sep 2008) | 1 line Fixed crash when starting IHNM, a regression from commit #34693 ........ r34707 | fingolfin | 2008-09-30 17:42:19 +0200 (Di, 30 Sep 2008) | 1 line Fixing ConfigManager::loadConfigFile ........ r34708 | fingolfin | 2008-09-30 18:23:35 +0200 (Di, 30 Sep 2008) | 1 line AGI: Another case where it is better to use FSNodes directly, instead of converting them to path strings ........ r34709 | fingolfin | 2008-09-30 18:34:38 +0200 (Di, 30 Sep 2008) | 1 line Modified FilePluginProvider to use FSNodes (instead of raw filenames / paths) in its API ........ r34710 | fingolfin | 2008-09-30 18:38:46 +0200 (Di, 30 Sep 2008) | 1 line AGI: Got rid of yet another unwarranted use of FSNode::getPath ........ r34711 | fingolfin | 2008-09-30 18:53:04 +0200 (Di, 30 Sep 2008) | 1 line AGI: Simplify WagFileParser by not reading data into a memory stream first (this was there to improve performance on systems with slow seeking; those systems should use another approach, see scummvm-devel) ........ r34712 | thebluegr | 2008-09-30 18:55:10 +0200 (Di, 30 Sep 2008) | 1 line Fix crash when starting ITE, a regression from commit #34705 ........ r34713 | fingolfin | 2008-09-30 19:09:41 +0200 (Di, 30 Sep 2008) | 1 line Fix ThemeBrowser to use FSNodes, not getPath() ........ r34715 | Kirben | 2008-10-02 16:41:50 +0200 (Do, 02 Okt 2008) | 1 line Correct HE version for Putt-Putt Enters the Race (French/Windows). ........ r34716 | fingolfin | 2008-10-02 18:58:59 +0200 (Do, 02 Okt 2008) | 1 line Renamed FilesystemNode -> FSNode ........ r34717 | fingolfin | 2008-10-02 19:08:15 +0200 (Do, 02 Okt 2008) | 1 line cleanup ........ r34718 | fingolfin | 2008-10-02 19:17:18 +0200 (Do, 02 Okt 2008) | 1 line Ignore String::deleteLastChar when called on an empty string ........ r34719 | fingolfin | 2008-10-02 19:20:21 +0200 (Do, 02 Okt 2008) | 1 line Fix for bug #2142743: Assertion on clicking "Theme" in Options ........ r34720 | fingolfin | 2008-10-02 19:48:01 +0200 (Do, 02 Okt 2008) | 7 lines Engine class changed: - Moved initCommonGFX() && GUIErrorMessage() out of class Engine - got rid of the _autosavePeriod member (this prevented users from changing the autosave period during runtime) - Got rid of an evil 'using GUI::Dialog' statement - Clarified some Doxygen comments ........ r34721 | fingolfin | 2008-10-02 19:52:29 +0200 (Do, 02 Okt 2008) | 1 line Add the current dir to the global SearchSet, i.e. to SearchMan (this should fix the problems on Windows, and maybe other systems, see 'bug' #2137680) ........ r34722 | fingolfin | 2008-10-02 19:55:08 +0200 (Do, 02 Okt 2008) | 1 line Forgot to mention yet another Engine class change: mainMenuDialog -> openMainMenuDialog; and also forgot to commit this related file :/ ........ r34725 | fingolfin | 2008-10-02 20:11:40 +0200 (Do, 02 Okt 2008) | 1 line typo ........ svn-id: r34730
Diffstat (limited to 'backends')
-rw-r--r--backends/events/default/default-events.cpp4
-rw-r--r--backends/fs/abstract-fs.cpp2
-rw-r--r--backends/fs/abstract-fs.h20
-rw-r--r--backends/fs/amigaos4/amigaos4-fs-factory.cpp6
-rw-r--r--backends/fs/amigaos4/amigaos4-fs-factory.h6
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.cpp24
-rw-r--r--backends/fs/ds/ds-fs-factory.cpp6
-rw-r--r--backends/fs/ds/ds-fs-factory.h6
-rw-r--r--backends/fs/ds/ds-fs.cpp16
-rw-r--r--backends/fs/ds/ds-fs.h20
-rw-r--r--backends/fs/fs-factory.h10
-rw-r--r--backends/fs/palmos/palmos-fs-factory.cpp6
-rw-r--r--backends/fs/palmos/palmos-fs-factory.h6
-rw-r--r--backends/fs/palmos/palmos-fs.cpp16
-rw-r--r--backends/fs/posix/posix-fs-factory.cpp6
-rw-r--r--backends/fs/posix/posix-fs-factory.h6
-rw-r--r--backends/fs/posix/posix-fs.cpp8
-rw-r--r--backends/fs/posix/posix-fs.h10
-rw-r--r--backends/fs/ps2/ps2-fs-factory.cpp6
-rw-r--r--backends/fs/ps2/ps2-fs-factory.h6
-rw-r--r--backends/fs/ps2/ps2-fs.cpp20
-rw-r--r--backends/fs/psp/psp-fs-factory.cpp6
-rw-r--r--backends/fs/psp/psp-fs-factory.h6
-rw-r--r--backends/fs/psp/psp-fs.cpp16
-rw-r--r--backends/fs/symbian/symbian-fs-factory.cpp6
-rw-r--r--backends/fs/symbian/symbian-fs-factory.h6
-rw-r--r--backends/fs/symbian/symbian-fs.cpp16
-rw-r--r--backends/fs/wii/wii-fs-factory.cpp6
-rw-r--r--backends/fs/wii/wii-fs-factory.h6
-rw-r--r--backends/fs/wii/wii-fs.cpp16
-rw-r--r--backends/fs/windows/windows-fs-factory.cpp6
-rw-r--r--backends/fs/windows/windows-fs-factory.h6
-rw-r--r--backends/fs/windows/windows-fs.cpp16
-rw-r--r--backends/platform/dc/dc-fs.cpp30
-rw-r--r--backends/platform/dc/dc.h6
-rw-r--r--backends/platform/dc/selector.cpp8
-rw-r--r--backends/platform/gp2x/gp2x.cpp1
-rw-r--r--backends/platform/sdl/sdl.cpp8
-rw-r--r--backends/platform/sdl/sdl.h2
-rw-r--r--backends/platform/symbian/src/SymbianOS.cpp4
-rw-r--r--backends/platform/wince/CELauncherDialog.cpp6
-rw-r--r--backends/platform/wince/CELauncherDialog.h2
-rw-r--r--backends/plugins/dc/dc-provider.cpp8
-rw-r--r--backends/plugins/dc/dc-provider.h4
-rw-r--r--backends/plugins/posix/posix-provider.cpp5
-rw-r--r--backends/plugins/posix/posix-provider.h2
-rw-r--r--backends/plugins/sdl/sdl-provider.cpp5
-rw-r--r--backends/plugins/sdl/sdl-provider.h2
-rw-r--r--backends/plugins/win32/win32-provider.cpp8
-rw-r--r--backends/plugins/win32/win32-provider.h4
-rw-r--r--backends/saves/default/default-saves.cpp20
-rw-r--r--backends/saves/default/default-saves.h2
52 files changed, 228 insertions, 221 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index e12ab09433..9ab7ab620c 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -460,7 +460,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
// as an event now and open up the GMM itself it would open the
// menu twice.
if (g_engine && !g_engine->isPaused())
- g_engine->mainMenuDialog();
+ g_engine->openMainMenuDialog();
if (_shouldQuit)
event.type = Common::EVENT_QUIT;
@@ -530,7 +530,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
case Common::EVENT_MAINMENU:
if (g_engine && !g_engine->isPaused())
- g_engine->mainMenuDialog();
+ g_engine->openMainMenuDialog();
if (_shouldQuit)
event.type = Common::EVENT_QUIT;
diff --git a/backends/fs/abstract-fs.cpp b/backends/fs/abstract-fs.cpp
index 6daad7152a..aa341e70d9 100644
--- a/backends/fs/abstract-fs.cpp
+++ b/backends/fs/abstract-fs.cpp
@@ -24,7 +24,7 @@
#include "backends/fs/abstract-fs.h"
-const char *AbstractFilesystemNode::lastPathComponent(const Common::String &str, const char sep) {
+const char *AbstractFSNode::lastPathComponent(const Common::String &str, const char sep) {
// TODO: Get rid of this eventually! Use Common::lastPathComponent instead
if(str.empty())
return "";
diff --git a/backends/fs/abstract-fs.h b/backends/fs/abstract-fs.h
index b3a652f2ae..68478ea8a4 100644
--- a/backends/fs/abstract-fs.h
+++ b/backends/fs/abstract-fs.h
@@ -29,22 +29,22 @@
#include "common/str.h"
#include "common/fs.h"
-class AbstractFilesystemNode;
+class AbstractFSNode;
-typedef Common::Array<AbstractFilesystemNode *> AbstractFSList;
+typedef Common::Array<AbstractFSNode *> AbstractFSList;
/**
* Abstract file system node. Private subclasses implement the actual
* functionality.
*
- * Most of the methods correspond directly to methods in class FilesystemNode,
+ * Most of the methods correspond directly to methods in class FSNode,
* so if they are not documented here, look there for more information about
* the semantics.
*/
-class AbstractFilesystemNode {
+class AbstractFSNode {
protected:
- friend class Common::FilesystemNode;
- typedef Common::FilesystemNode::ListMode ListMode;
+ friend class Common::FSNode;
+ typedef Common::FSNode::ListMode ListMode;
/**
* Returns the child node with the given name. When called on a non-directory
@@ -63,13 +63,13 @@ protected:
*
* @param name String containing the name of the child to create a new node.
*/
- virtual AbstractFilesystemNode *getChild(const Common::String &name) const = 0;
+ virtual AbstractFSNode *getChild(const Common::String &name) const = 0;
/**
* The parent node of this directory.
* The parent of the root is the root itself.
*/
- virtual AbstractFilesystemNode *getParent() const = 0;
+ virtual AbstractFSNode *getParent() const = 0;
/**
* Returns the last component of a given path.
@@ -88,7 +88,7 @@ public:
/**
* Destructor.
*/
- virtual ~AbstractFilesystemNode() {}
+ virtual ~AbstractFSNode() {}
/*
* Indicates whether the object referred by this path exists in the filesystem or not.
@@ -115,7 +115,7 @@ public:
virtual Common::String getDisplayName() const { return getName(); }
/**
- * Returns the last component of the path pointed by this FilesystemNode.
+ * Returns the last component of the path pointed by this FSNode.
*
* Examples (POSIX):
* /foo/bar.txt would return /bar.txt
diff --git a/backends/fs/amigaos4/amigaos4-fs-factory.cpp b/backends/fs/amigaos4/amigaos4-fs-factory.cpp
index 2b0b2f1908..2c7dc61278 100644
--- a/backends/fs/amigaos4/amigaos4-fs-factory.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs-factory.cpp
@@ -26,15 +26,15 @@
#include "backends/fs/amigaos4/amigaos4-fs-factory.h"
#include "backends/fs/amigaos4/amigaos4-fs.cpp"
-AbstractFilesystemNode *AmigaOSFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *AmigaOSFilesystemFactory::makeRootFileNode() const {
return new AmigaOSFilesystemNode();
}
-AbstractFilesystemNode *AmigaOSFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *AmigaOSFilesystemFactory::makeCurrentDirectoryFileNode() const {
return new AmigaOSFilesystemNode();
}
-AbstractFilesystemNode *AmigaOSFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *AmigaOSFilesystemFactory::makeFileNodePath(const Common::String &path) const {
return new AmigaOSFilesystemNode(path);
}
#endif
diff --git a/backends/fs/amigaos4/amigaos4-fs-factory.h b/backends/fs/amigaos4/amigaos4-fs-factory.h
index 03af6e95b9..89b3c7008d 100644
--- a/backends/fs/amigaos4/amigaos4-fs-factory.h
+++ b/backends/fs/amigaos4/amigaos4-fs-factory.h
@@ -34,9 +34,9 @@
*/
class AmigaOSFilesystemFactory : public FilesystemFactory {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
};
#endif /*AMIGAOS_FILESYSTEM_FACTORY_H*/
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index d517121dc0..3b8d7b635c 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -47,9 +47,9 @@ const uint32 kExAllBufferSize = 40960; // TODO: is this okay for sure?
/**
* Implementation of the ScummVM file system API.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class AmigaOSFilesystemNode : public AbstractFilesystemNode {
+class AmigaOSFilesystemNode : public AbstractFSNode {
protected:
BPTR _pFileLock;
Common::String _sDisplayName;
@@ -58,7 +58,7 @@ protected:
bool _bIsValid;
/**
- * Obtain the FileInfoBlock protection value for this FilesystemNode,
+ * Obtain the FileInfoBlock protection value for this FSNode,
* as defined in the <proto/dos.h> header.
*
* @return -1 if there were errors, 0 or a positive integer otherwise.
@@ -103,9 +103,9 @@ public:
virtual bool isReadable() const;
virtual bool isWritable() const;
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -302,7 +302,7 @@ bool AmigaOSFilesystemNode::exists() const {
return nodeExists;
}
-AbstractFilesystemNode *AmigaOSFilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *AmigaOSFilesystemNode::getChild(const Common::String &n) const {
ENTER();
if (!_bIsDirectory) {
debug(6, "Not a directory");
@@ -371,9 +371,9 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
struct ExAllData *ead = data;
do {
- if ((mode == Common::FilesystemNode::kListAll) ||
- (EAD_IS_DRAWER(ead) && (mode == Common::FilesystemNode::kListDirectoriesOnly)) ||
- (EAD_IS_FILE(ead) && (mode == Common::FilesystemNode::kListFilesOnly))) {
+ if ((mode == Common::FSNode::kListAll) ||
+ (EAD_IS_DRAWER(ead) && (mode == Common::FSNode::kListDirectoriesOnly)) ||
+ (EAD_IS_FILE(ead) && (mode == Common::FSNode::kListFilesOnly))) {
Common::String full_path = _sPath;
full_path += (char*)ead->ed_Name;
@@ -381,7 +381,7 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
if (lock) {
AmigaOSFilesystemNode *entry = new AmigaOSFilesystemNode(lock, (char *)ead->ed_Name);
if (entry) {
- //FIXME: since the isValid() function is no longer part of the AbstractFilesystemNode
+ //FIXME: since the isValid() function is no longer part of the AbstractFSNode
// specification, the following call had to be changed:
// if (entry->isValid())
// Please verify that the logic of the code remains coherent. Also, remember
@@ -433,7 +433,7 @@ int AmigaOSFilesystemNode::getFibProtection() const {
return fibProt;
}
-AbstractFilesystemNode *AmigaOSFilesystemNode::getParent() const {
+AbstractFSNode *AmigaOSFilesystemNode::getParent() const {
ENTER();
if (!_bIsDirectory) {
@@ -543,7 +543,7 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const {
AmigaOSFilesystemNode *entry = new AmigaOSFilesystemNode(volumeLock, buffer);
if (entry) {
- //FIXME: since the isValid() function is no longer part of the AbstractFilesystemNode
+ //FIXME: since the isValid() function is no longer part of the AbstractFSNode
// specification, the following call had to be changed:
// if (entry->isValid())
// Please verify that the logic of the code remains coherent. Also, remember
diff --git a/backends/fs/ds/ds-fs-factory.cpp b/backends/fs/ds/ds-fs-factory.cpp
index 5c8c3f45f8..0dfa70b716 100644
--- a/backends/fs/ds/ds-fs-factory.cpp
+++ b/backends/fs/ds/ds-fs-factory.cpp
@@ -29,7 +29,7 @@
DECLARE_SINGLETON(DSFilesystemFactory);
-AbstractFilesystemNode *DSFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *DSFilesystemFactory::makeRootFileNode() const {
if (DS::isGBAMPAvailable()) {
return new DS::GBAMPFileSystemNode();
} else {
@@ -37,7 +37,7 @@ AbstractFilesystemNode *DSFilesystemFactory::makeRootFileNode() const {
}
}
-AbstractFilesystemNode *DSFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *DSFilesystemFactory::makeCurrentDirectoryFileNode() const {
if (DS::isGBAMPAvailable()) {
return new DS::GBAMPFileSystemNode();
} else {
@@ -45,7 +45,7 @@ AbstractFilesystemNode *DSFilesystemFactory::makeCurrentDirectoryFileNode() cons
}
}
-AbstractFilesystemNode *DSFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *DSFilesystemFactory::makeFileNodePath(const Common::String &path) const {
if (DS::isGBAMPAvailable()) {
return new DS::GBAMPFileSystemNode(path);
} else {
diff --git a/backends/fs/ds/ds-fs-factory.h b/backends/fs/ds/ds-fs-factory.h
index 67e0076b78..f4b381c477 100644
--- a/backends/fs/ds/ds-fs-factory.h
+++ b/backends/fs/ds/ds-fs-factory.h
@@ -35,9 +35,9 @@
*/
class DSFilesystemFactory : public FilesystemFactory, public Common::Singleton<DSFilesystemFactory> {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
protected:
DSFilesystemFactory() {};
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp
index 911702316d..5fc284b4d8 100644
--- a/backends/fs/ds/ds-fs.cpp
+++ b/backends/fs/ds/ds-fs.cpp
@@ -125,7 +125,7 @@ DSFileSystemNode::DSFileSystemNode(const DSFileSystemNode* node) {
//TODO: not implemented?
}
-AbstractFilesystemNode *DSFileSystemNode::getChild(const Common::String& n) const {
+AbstractFSNode *DSFileSystemNode::getChild(const Common::String& n) const {
if (_path.lastChar() == '\\') {
return new DSFileSystemNode(_path + n);
} else {
@@ -168,8 +168,8 @@ bool DSFileSystemNode::getChildren(AbstractFSList &dirList, ListMode mode, bool
_zipFile->getFileName(n);
// consolePrintf("file: %s\n", n);
- if ( (_zipFile->isDirectory() && ((mode == Common::FilesystemNode::kListDirectoriesOnly) || (mode == Common::FilesystemNode::kListAll)) )
- || (!_zipFile->isDirectory() && ((mode == Common::FilesystemNode::kListFilesOnly) || (mode == Common::FilesystemNode::kListAll)) ) )
+ if ( (_zipFile->isDirectory() && ((mode == Common::FSNode::kListDirectoriesOnly) || (mode == Common::FSNode::kListAll)) )
+ || (!_zipFile->isDirectory() && ((mode == Common::FSNode::kListFilesOnly) || (mode == Common::FSNode::kListAll)) ) )
{
DSFileSystemNode* dsfsn = new DSFileSystemNode("ds:/" + Common::String(n), _zipFile->isDirectory());
dsfsn->_isDirectory = _zipFile->isDirectory();
@@ -182,7 +182,7 @@ bool DSFileSystemNode::getChildren(AbstractFSList &dirList, ListMode mode, bool
return true;
}
-AbstractFilesystemNode* DSFileSystemNode::getParent() const {
+AbstractFSNode* DSFileSystemNode::getParent() const {
// consolePrintf("parent\n");
DSFileSystemNode *p;
@@ -285,7 +285,7 @@ GBAMPFileSystemNode::GBAMPFileSystemNode(const GBAMPFileSystemNode* node) {
//TODO: not implemented?
}
-AbstractFilesystemNode *GBAMPFileSystemNode::getChild(const Common::String& n) const {
+AbstractFSNode *GBAMPFileSystemNode::getChild(const Common::String& n) const {
if (_path.lastChar() == '\\') {
return new DSFileSystemNode(_path + n);
} else {
@@ -322,8 +322,8 @@ bool GBAMPFileSystemNode::getChildren(AbstractFSList& dirList, ListMode mode, bo
while (entryType != TYPE_NO_MORE) {
- if ( ((entryType == TYPE_DIR) && ((mode == Common::FilesystemNode::kListDirectoriesOnly) || (mode == Common::FilesystemNode::kListAll)))
- || ((entryType == TYPE_FILE) && ((mode == Common::FilesystemNode::kListFilesOnly) || (mode == Common::FilesystemNode::kListAll))) ) {
+ if ( ((entryType == TYPE_DIR) && ((mode == Common::FSNode::kListDirectoriesOnly) || (mode == Common::FSNode::kListAll)))
+ || ((entryType == TYPE_FILE) && ((mode == Common::FSNode::kListFilesOnly) || (mode == Common::FSNode::kListAll))) ) {
GBAMPFileSystemNode* dsfsn;
consolePrintf("Fname: %s\n", fname);
@@ -353,7 +353,7 @@ bool GBAMPFileSystemNode::getChildren(AbstractFSList& dirList, ListMode mode, bo
return true;
}
-AbstractFilesystemNode* GBAMPFileSystemNode::getParent() const {
+AbstractFSNode* GBAMPFileSystemNode::getParent() const {
// consolePrintf("parent\n");
GBAMPFileSystemNode *p;
diff --git a/backends/fs/ds/ds-fs.h b/backends/fs/ds/ds-fs.h
index 36e7bc9824..24d51d9d71 100644
--- a/backends/fs/ds/ds-fs.h
+++ b/backends/fs/ds/ds-fs.h
@@ -37,9 +37,9 @@ namespace DS {
* Implementation of the ScummVM file system API.
* This class is used when a Flash cart is in use.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class DSFileSystemNode : public AbstractFilesystemNode {
+class DSFileSystemNode : public AbstractFSNode {
protected:
static ZipFile* _zipFile;
@@ -85,10 +85,10 @@ public:
/**
* Returns a copy of this node.
*/
- virtual AbstractFilesystemNode *clone() const { return new DSFileSystemNode(this); }
- virtual AbstractFilesystemNode *getChild(const Common::String& name) const;
+ virtual AbstractFSNode *clone() const { return new DSFileSystemNode(this); }
+ virtual AbstractFSNode *getChild(const Common::String& name) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -104,9 +104,9 @@ public:
* Implementation of the ScummVM file system API.
* This class is used when the GBAMP (GBA Movie Player) is used with a CompactFlash card.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class GBAMPFileSystemNode : public AbstractFilesystemNode {
+class GBAMPFileSystemNode : public AbstractFSNode {
protected:
Common::String _displayName;
Common::String _path;
@@ -150,10 +150,10 @@ public:
/**
* Returns a copy of this node.
*/
- virtual AbstractFilesystemNode *clone() const { return new GBAMPFileSystemNode(this); }
- virtual AbstractFilesystemNode *getChild(const Common::String& name) const;
+ virtual AbstractFSNode *clone() const { return new GBAMPFileSystemNode(this); }
+ virtual AbstractFSNode *getChild(const Common::String& name) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
diff --git a/backends/fs/fs-factory.h b/backends/fs/fs-factory.h
index f0c82a0ca4..cfa5b87edd 100644
--- a/backends/fs/fs-factory.h
+++ b/backends/fs/fs-factory.h
@@ -29,7 +29,7 @@
#include "backends/fs/abstract-fs.h"
/**
- * Creates concrete FilesystemNode objects depending on the current architecture.
+ * Creates concrete FSNode objects depending on the current architecture.
*/
class FilesystemFactory {
public:
@@ -44,7 +44,7 @@ public:
* emulate it or simply return some "sensible" default directory node,
* e.g. the same value as getRoot() returns.
*/
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const = 0;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const = 0;
/**
* Construct a node based on a path; the path is in the same format as it
@@ -54,9 +54,9 @@ public:
* identical to oldNode. Hence, we can use the "path" value for persistent
* storage e.g. in the config file.
*
- * @param path The path string to create a FilesystemNode for.
+ * @param path The path string to create a FSNode for.
*/
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const = 0;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const = 0;
/**
* Returns a special node representing the filesystem root.
@@ -65,7 +65,7 @@ public:
* On Unix, this will be simply the node for / (the root directory).
* On Windows, it will be a special node which "contains" all drives (C:, D:, E:).
*/
- virtual AbstractFilesystemNode *makeRootFileNode() const = 0;
+ virtual AbstractFSNode *makeRootFileNode() const = 0;
};
#endif /*FILESYSTEM_FACTORY_H*/
diff --git a/backends/fs/palmos/palmos-fs-factory.cpp b/backends/fs/palmos/palmos-fs-factory.cpp
index bbc1639897..889d541571 100644
--- a/backends/fs/palmos/palmos-fs-factory.cpp
+++ b/backends/fs/palmos/palmos-fs-factory.cpp
@@ -28,15 +28,15 @@
DECLARE_SINGLETON(PalmOSFilesystemFactory);
-AbstractFilesystemNode *PalmOSFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *PalmOSFilesystemFactory::makeRootFileNode() const {
return new PalmOSFilesystemNode();
}
-AbstractFilesystemNode *PalmOSFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *PalmOSFilesystemFactory::makeCurrentDirectoryFileNode() const {
return new PalmOSFilesystemNode();
}
-AbstractFilesystemNode *PalmOSFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *PalmOSFilesystemFactory::makeFileNodePath(const Common::String &path) const {
return new PalmOSFilesystemNode(path);
}
#endif
diff --git a/backends/fs/palmos/palmos-fs-factory.h b/backends/fs/palmos/palmos-fs-factory.h
index f778aa89ef..72729c570d 100644
--- a/backends/fs/palmos/palmos-fs-factory.h
+++ b/backends/fs/palmos/palmos-fs-factory.h
@@ -35,9 +35,9 @@
*/
class PalmOSFilesystemFactory : public FilesystemFactory, public Common::Singleton<PalmOSFilesystemFactory> {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
protected:
PalmOSFilesystemFactory() {};
diff --git a/backends/fs/palmos/palmos-fs.cpp b/backends/fs/palmos/palmos-fs.cpp
index 7c415aa320..b828213817 100644
--- a/backends/fs/palmos/palmos-fs.cpp
+++ b/backends/fs/palmos/palmos-fs.cpp
@@ -33,9 +33,9 @@
/**
* Implementation of the ScummVM file system API based on PalmOS VFS API.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class PalmOSFilesystemNode : public AbstractFilesystemNode {
+class PalmOSFilesystemNode : public AbstractFSNode {
protected:
Common::String _displayName;
Common::String _path;
@@ -64,9 +64,9 @@ public:
virtual bool isReadable() const { return true; } //FIXME: this is just a stub
virtual bool isWritable() const { return true; } //FIXME: this is just a stub
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -90,8 +90,8 @@ void PalmOSFilesystemNode::addFile(AbstractFSList &list, ListMode mode, const ch
isDir = (find_data->attributes & vfsFileAttrDirectory);
- if ((!isDir && mode == Common::FilesystemNode::kListDirectoriesOnly) ||
- (isDir && mode == Common::FilesystemNode::kListFilesOnly))
+ if ((!isDir && mode == Common::FSNode::kListDirectoriesOnly) ||
+ (isDir && mode == Common::FSNode::kListFilesOnly))
return;
entry._isDirectory = isDir;
@@ -139,7 +139,7 @@ PalmOSFilesystemNode::PalmOSFilesystemNode(const Common::String &p) {
_isPseudoRoot = false;
}
-AbstractFilesystemNode *PalmOSFilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *PalmOSFilesystemNode::getChild(const Common::String &n) const {
assert(_isDirectory);
Common::String newPath(_path);
@@ -190,7 +190,7 @@ bool PalmOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bo
return true;
}
-AbstractFilesystemNode *PalmOSFilesystemNode::getParent() const {
+AbstractFSNode *PalmOSFilesystemNode::getParent() const {
PalmOSFilesystemNode *p = 0;
if (!_isPseudoRoot) {
diff --git a/backends/fs/posix/posix-fs-factory.cpp b/backends/fs/posix/posix-fs-factory.cpp
index cbfb69b76a..ae60fbaccb 100644
--- a/backends/fs/posix/posix-fs-factory.cpp
+++ b/backends/fs/posix/posix-fs-factory.cpp
@@ -26,17 +26,17 @@
#include "backends/fs/posix/posix-fs-factory.h"
#include "backends/fs/posix/posix-fs.cpp"
-AbstractFilesystemNode *POSIXFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *POSIXFilesystemFactory::makeRootFileNode() const {
return new POSIXFilesystemNode("/");
}
-AbstractFilesystemNode *POSIXFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *POSIXFilesystemFactory::makeCurrentDirectoryFileNode() const {
char buf[MAXPATHLEN];
getcwd(buf, MAXPATHLEN);
return new POSIXFilesystemNode(buf);
}
-AbstractFilesystemNode *POSIXFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *POSIXFilesystemFactory::makeFileNodePath(const Common::String &path) const {
assert(!path.empty());
return new POSIXFilesystemNode(path);
}
diff --git a/backends/fs/posix/posix-fs-factory.h b/backends/fs/posix/posix-fs-factory.h
index c697679814..68c1fdd876 100644
--- a/backends/fs/posix/posix-fs-factory.h
+++ b/backends/fs/posix/posix-fs-factory.h
@@ -33,9 +33,9 @@
* Parts of this class are documented in the base interface class, FilesystemFactory.
*/
class POSIXFilesystemFactory : public FilesystemFactory {
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
};
#endif /*POSIX_FILESYSTEM_FACTORY_H*/
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index 8dca78d82a..463d647042 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -92,7 +92,7 @@ POSIXFilesystemNode::POSIXFilesystemNode(const Common::String &p) {
setFlags();
}
-AbstractFilesystemNode *POSIXFilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *POSIXFilesystemNode::getChild(const Common::String &n) const {
assert(!_path.empty());
assert(_isDirectory);
@@ -197,8 +197,8 @@ bool POSIXFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, boo
continue;
// Honor the chosen mode
- if ((mode == Common::FilesystemNode::kListFilesOnly && entry._isDirectory) ||
- (mode == Common::FilesystemNode::kListDirectoriesOnly && !entry._isDirectory))
+ if ((mode == Common::FSNode::kListFilesOnly && entry._isDirectory) ||
+ (mode == Common::FSNode::kListDirectoriesOnly && !entry._isDirectory))
continue;
myList.push_back(new POSIXFilesystemNode(entry));
@@ -208,7 +208,7 @@ bool POSIXFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, boo
return true;
}
-AbstractFilesystemNode *POSIXFilesystemNode::getParent() const {
+AbstractFSNode *POSIXFilesystemNode::getParent() const {
if (_path == "/")
return 0; // The filesystem root has no parent
diff --git a/backends/fs/posix/posix-fs.h b/backends/fs/posix/posix-fs.h
index e09e433e05..7bd21c94b1 100644
--- a/backends/fs/posix/posix-fs.h
+++ b/backends/fs/posix/posix-fs.h
@@ -35,16 +35,16 @@
/**
* Implementation of the ScummVM file system API based on POSIX.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class POSIXFilesystemNode : public AbstractFilesystemNode {
+class POSIXFilesystemNode : public AbstractFSNode {
protected:
Common::String _displayName;
Common::String _path;
bool _isDirectory;
bool _isValid;
- virtual AbstractFilesystemNode *makeNode(const Common::String &path) const {
+ virtual AbstractFSNode *makeNode(const Common::String &path) const {
return new POSIXFilesystemNode(path);
}
@@ -69,9 +69,9 @@ public:
virtual bool isReadable() const { return access(_path.c_str(), R_OK) == 0; }
virtual bool isWritable() const { return access(_path.c_str(), W_OK) == 0; }
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
diff --git a/backends/fs/ps2/ps2-fs-factory.cpp b/backends/fs/ps2/ps2-fs-factory.cpp
index e96671ee0a..77fb4b0866 100644
--- a/backends/fs/ps2/ps2-fs-factory.cpp
+++ b/backends/fs/ps2/ps2-fs-factory.cpp
@@ -28,15 +28,15 @@
DECLARE_SINGLETON(Ps2FilesystemFactory);
-AbstractFilesystemNode *Ps2FilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *Ps2FilesystemFactory::makeRootFileNode() const {
return new Ps2FilesystemNode();
}
-AbstractFilesystemNode *Ps2FilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *Ps2FilesystemFactory::makeCurrentDirectoryFileNode() const {
return new Ps2FilesystemNode();
}
-AbstractFilesystemNode *Ps2FilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *Ps2FilesystemFactory::makeFileNodePath(const Common::String &path) const {
// return new Ps2FilesystemNode(path);
Ps2FilesystemNode *nf = new Ps2FilesystemNode(path, true);
diff --git a/backends/fs/ps2/ps2-fs-factory.h b/backends/fs/ps2/ps2-fs-factory.h
index 432cf467c3..dd6b5dc013 100644
--- a/backends/fs/ps2/ps2-fs-factory.h
+++ b/backends/fs/ps2/ps2-fs-factory.h
@@ -35,9 +35,9 @@
*/
class Ps2FilesystemFactory : public FilesystemFactory, public Common::Singleton<Ps2FilesystemFactory> {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
protected:
Ps2FilesystemFactory() {};
diff --git a/backends/fs/ps2/ps2-fs.cpp b/backends/fs/ps2/ps2-fs.cpp
index 3d7656e9f0..fd20562a24 100644
--- a/backends/fs/ps2/ps2-fs.cpp
+++ b/backends/fs/ps2/ps2-fs.cpp
@@ -41,9 +41,9 @@ extern OSystem_PS2 *g_systemPs2;
/**
* Implementation of the ScummVM file system API based on the Ps2SDK.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class Ps2FilesystemNode : public AbstractFilesystemNode {
+class Ps2FilesystemNode : public AbstractFSNode {
friend class Ps2FilesystemFactory;
@@ -95,10 +95,10 @@ public:
return false;
}
- virtual AbstractFilesystemNode *clone() const { return new Ps2FilesystemNode(this); }
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *clone() const { return new Ps2FilesystemNode(this); }
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -210,7 +210,7 @@ bool Ps2FilesystemNode::getDirectoryFlag(const char *path) {
return false;
}
-AbstractFilesystemNode *Ps2FilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *Ps2FilesystemNode::getChild(const Common::String &n) const {
if (!_isDirectory)
return NULL;
@@ -288,9 +288,9 @@ bool Ps2FilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi
while ((dreadRes = fio.dread(fd, &dirent)) > 0) {
if (dirent.name[0] == '.')
continue; // ignore '.' and '..'
- if (((mode == Common::FilesystemNode::kListDirectoriesOnly) && (dirent.stat.mode & FIO_S_IFDIR)) ||
- ((mode == Common::FilesystemNode::kListFilesOnly) && !(dirent.stat.mode & FIO_S_IFDIR)) ||
- (mode == Common::FilesystemNode::kListAll)) {
+ if (((mode == Common::FSNode::kListDirectoriesOnly) && (dirent.stat.mode & FIO_S_IFDIR)) ||
+ ((mode == Common::FSNode::kListFilesOnly) && !(dirent.stat.mode & FIO_S_IFDIR)) ||
+ (mode == Common::FSNode::kListAll)) {
dirEntry._isDirectory = (bool)(dirent.stat.mode & FIO_S_IFDIR);
dirEntry._isRoot = false;
@@ -312,7 +312,7 @@ bool Ps2FilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi
}
}
-AbstractFilesystemNode *Ps2FilesystemNode::getParent() const {
+AbstractFSNode *Ps2FilesystemNode::getParent() const {
if (_isRoot)
return new Ps2FilesystemNode(this);
diff --git a/backends/fs/psp/psp-fs-factory.cpp b/backends/fs/psp/psp-fs-factory.cpp
index a38462f02a..cfe8ed27d1 100644
--- a/backends/fs/psp/psp-fs-factory.cpp
+++ b/backends/fs/psp/psp-fs-factory.cpp
@@ -28,15 +28,15 @@
DECLARE_SINGLETON(PSPFilesystemFactory);
-AbstractFilesystemNode *PSPFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *PSPFilesystemFactory::makeRootFileNode() const {
return new PSPFilesystemNode();
}
-AbstractFilesystemNode *PSPFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *PSPFilesystemFactory::makeCurrentDirectoryFileNode() const {
return new PSPFilesystemNode();
}
-AbstractFilesystemNode *PSPFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *PSPFilesystemFactory::makeFileNodePath(const Common::String &path) const {
return new PSPFilesystemNode(path, true);
}
#endif
diff --git a/backends/fs/psp/psp-fs-factory.h b/backends/fs/psp/psp-fs-factory.h
index abf03d288e..36ecb8188b 100644
--- a/backends/fs/psp/psp-fs-factory.h
+++ b/backends/fs/psp/psp-fs-factory.h
@@ -35,9 +35,9 @@
*/
class PSPFilesystemFactory : public FilesystemFactory, public Common::Singleton<PSPFilesystemFactory> {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
protected:
PSPFilesystemFactory() {};
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp
index 13cd63903b..bf08fdd2c6 100644
--- a/backends/fs/psp/psp-fs.cpp
+++ b/backends/fs/psp/psp-fs.cpp
@@ -36,9 +36,9 @@
/**
* Implementation of the ScummVM file system API based on PSPSDK API.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class PSPFilesystemNode : public AbstractFilesystemNode {
+class PSPFilesystemNode : public AbstractFSNode {
protected:
Common::String _displayName;
Common::String _path;
@@ -67,9 +67,9 @@ public:
virtual bool isReadable() const { return access(_path.c_str(), R_OK) == 0; }
virtual bool isWritable() const { return access(_path.c_str(), W_OK) == 0; }
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -97,7 +97,7 @@ PSPFilesystemNode::PSPFilesystemNode(const Common::String &p, bool verify) {
}
}
-AbstractFilesystemNode *PSPFilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *PSPFilesystemNode::getChild(const Common::String &n) const {
// FIXME: Pretty lame implementation! We do no error checking to speak
// of, do not check if this is a special node, etc.
assert(_isDirectory);
@@ -137,8 +137,8 @@ bool PSPFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool
entry._path += "/";
// Honor the chosen mode
- if ((mode == Common::FilesystemNode::kListFilesOnly && entry._isDirectory) ||
- (mode == Common::FilesystemNode::kListDirectoriesOnly && !entry._isDirectory))
+ if ((mode == Common::FSNode::kListFilesOnly && entry._isDirectory) ||
+ (mode == Common::FSNode::kListDirectoriesOnly && !entry._isDirectory))
continue;
myList.push_back(new PSPFilesystemNode(entry));
@@ -151,7 +151,7 @@ bool PSPFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool
}
}
-AbstractFilesystemNode *PSPFilesystemNode::getParent() const {
+AbstractFSNode *PSPFilesystemNode::getParent() const {
if (_path == ROOT_PATH)
return 0;
diff --git a/backends/fs/symbian/symbian-fs-factory.cpp b/backends/fs/symbian/symbian-fs-factory.cpp
index c31dfb594a..c70a67f339 100644
--- a/backends/fs/symbian/symbian-fs-factory.cpp
+++ b/backends/fs/symbian/symbian-fs-factory.cpp
@@ -26,17 +26,17 @@
#include "backends/fs/symbian/symbian-fs-factory.h"
#include "backends/fs/symbian/symbian-fs.cpp"
-AbstractFilesystemNode *SymbianFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *SymbianFilesystemFactory::makeRootFileNode() const {
return new SymbianFilesystemNode(true);
}
-AbstractFilesystemNode *SymbianFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *SymbianFilesystemFactory::makeCurrentDirectoryFileNode() const {
char path[MAXPATHLEN];
getcwd(path, MAXPATHLEN);
return new SymbianFilesystemNode(path);
}
-AbstractFilesystemNode *SymbianFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *SymbianFilesystemFactory::makeFileNodePath(const Common::String &path) const {
return new SymbianFilesystemNode(path);
}
#endif
diff --git a/backends/fs/symbian/symbian-fs-factory.h b/backends/fs/symbian/symbian-fs-factory.h
index ef5a231e72..2ad75b41ee 100644
--- a/backends/fs/symbian/symbian-fs-factory.h
+++ b/backends/fs/symbian/symbian-fs-factory.h
@@ -34,9 +34,9 @@
*/
class SymbianFilesystemFactory : public FilesystemFactory {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
};
#endif /*SYMBIAN_FILESYSTEM_FACTORY_H*/
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp
index 1c6d8435a9..74b7c28873 100644
--- a/backends/fs/symbian/symbian-fs.cpp
+++ b/backends/fs/symbian/symbian-fs.cpp
@@ -37,9 +37,9 @@
/**
* Implementation of the ScummVM file system API based on POSIX.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class SymbianFilesystemNode : public AbstractFilesystemNode {
+class SymbianFilesystemNode : public AbstractFSNode {
protected:
Common::String _displayName;
Common::String _path;
@@ -75,9 +75,9 @@ public:
virtual bool isReadable() const { return access(_path.c_str(), R_OK) == 0; } //FIXME: this is just a stub
virtual bool isWritable() const { return access(_path.c_str(), W_OK) == 0; } //FIXME: this is just a stub
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -133,7 +133,7 @@ SymbianFilesystemNode::SymbianFilesystemNode(const Common::String &path) {
}
}
-AbstractFilesystemNode *SymbianFilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *SymbianFilesystemNode::getChild(const Common::String &n) const {
assert(_isDirectory);
Common::String newPath(_path);
@@ -216,8 +216,8 @@ bool SymbianFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
entry._isDirectory = fileentry.IsDir();
// Honor the chosen mode
- if ((mode == Common::FilesystemNode::kListFilesOnly && entry._isDirectory) ||
- (mode == Common::FilesystemNode::kListDirectoriesOnly && !entry._isDirectory))
+ if ((mode == Common::FSNode::kListFilesOnly && entry._isDirectory) ||
+ (mode == Common::FSNode::kListDirectoriesOnly && !entry._isDirectory))
continue;
myList.push_back(new SymbianFilesystemNode(entry));
@@ -229,7 +229,7 @@ bool SymbianFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
return true;
}
-AbstractFilesystemNode *SymbianFilesystemNode::getParent() const {
+AbstractFSNode *SymbianFilesystemNode::getParent() const {
SymbianFilesystemNode *p =NULL;
// Root node is its own parent. Still we can't just return this
diff --git a/backends/fs/wii/wii-fs-factory.cpp b/backends/fs/wii/wii-fs-factory.cpp
index 69086a95f1..0112ffa150 100644
--- a/backends/fs/wii/wii-fs-factory.cpp
+++ b/backends/fs/wii/wii-fs-factory.cpp
@@ -29,11 +29,11 @@
DECLARE_SINGLETON(WiiFilesystemFactory);
-AbstractFilesystemNode *WiiFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *WiiFilesystemFactory::makeRootFileNode() const {
return new WiiFilesystemNode();
}
-AbstractFilesystemNode *WiiFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *WiiFilesystemFactory::makeCurrentDirectoryFileNode() const {
char buf[MAXPATHLEN];
if (getcwd(buf, MAXPATHLEN))
@@ -42,7 +42,7 @@ AbstractFilesystemNode *WiiFilesystemFactory::makeCurrentDirectoryFileNode() con
return new WiiFilesystemNode();
}
-AbstractFilesystemNode *WiiFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *WiiFilesystemFactory::makeFileNodePath(const Common::String &path) const {
return new WiiFilesystemNode(path, true);
}
#endif
diff --git a/backends/fs/wii/wii-fs-factory.h b/backends/fs/wii/wii-fs-factory.h
index 36867a392c..be20244a0e 100644
--- a/backends/fs/wii/wii-fs-factory.h
+++ b/backends/fs/wii/wii-fs-factory.h
@@ -33,9 +33,9 @@
*/
class WiiFilesystemFactory : public FilesystemFactory, public Common::Singleton<WiiFilesystemFactory> {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
protected:
WiiFilesystemFactory() {};
diff --git a/backends/fs/wii/wii-fs.cpp b/backends/fs/wii/wii-fs.cpp
index a620df5471..714555b02d 100644
--- a/backends/fs/wii/wii-fs.cpp
+++ b/backends/fs/wii/wii-fs.cpp
@@ -34,9 +34,9 @@
/**
* Implementation of the ScummVM file system API based on Wii.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class WiiFilesystemNode : public AbstractFilesystemNode {
+class WiiFilesystemNode : public AbstractFSNode {
protected:
Common::String _displayName;
Common::String _path;
@@ -64,9 +64,9 @@ public:
virtual bool isReadable() const { return _isReadable; }
virtual bool isWritable() const { return _isWritable; }
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -114,7 +114,7 @@ bool WiiFilesystemNode::exists() const {
return stat(_path.c_str (), &st) == 0;
}
-AbstractFilesystemNode *WiiFilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *WiiFilesystemNode::getChild(const Common::String &n) const {
assert(_isDirectory);
Common::String newPath(_path);
@@ -147,8 +147,8 @@ bool WiiFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool
bool isDir = S_ISDIR(st.st_mode);
- if ((mode == Common::FilesystemNode::kListFilesOnly && isDir) ||
- (mode == Common::FilesystemNode::kListDirectoriesOnly && !isDir))
+ if ((mode == Common::FSNode::kListFilesOnly && isDir) ||
+ (mode == Common::FSNode::kListDirectoriesOnly && !isDir))
continue;
if (isDir)
@@ -162,7 +162,7 @@ bool WiiFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool
return true;
}
-AbstractFilesystemNode *WiiFilesystemNode::getParent() const {
+AbstractFSNode *WiiFilesystemNode::getParent() const {
if (_path == "/")
return 0;
diff --git a/backends/fs/windows/windows-fs-factory.cpp b/backends/fs/windows/windows-fs-factory.cpp
index ed273bb746..c74868b40d 100644
--- a/backends/fs/windows/windows-fs-factory.cpp
+++ b/backends/fs/windows/windows-fs-factory.cpp
@@ -26,15 +26,15 @@
#include "backends/fs/windows/windows-fs-factory.h"
#include "backends/fs/windows/windows-fs.cpp"
-AbstractFilesystemNode *WindowsFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *WindowsFilesystemFactory::makeRootFileNode() const {
return new WindowsFilesystemNode();
}
-AbstractFilesystemNode *WindowsFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *WindowsFilesystemFactory::makeCurrentDirectoryFileNode() const {
return new WindowsFilesystemNode("", true);
}
-AbstractFilesystemNode *WindowsFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *WindowsFilesystemFactory::makeFileNodePath(const Common::String &path) const {
return new WindowsFilesystemNode(path, false);
}
#endif
diff --git a/backends/fs/windows/windows-fs-factory.h b/backends/fs/windows/windows-fs-factory.h
index 3c7b80942d..cb2b102538 100644
--- a/backends/fs/windows/windows-fs-factory.h
+++ b/backends/fs/windows/windows-fs-factory.h
@@ -34,9 +34,9 @@
*/
class WindowsFilesystemFactory : public FilesystemFactory {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
};
#endif /*WINDOWS_FILESYSTEM_FACTORY_H*/
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp
index c59c7dbe71..7f5c85ee7d 100644
--- a/backends/fs/windows/windows-fs.cpp
+++ b/backends/fs/windows/windows-fs.cpp
@@ -55,9 +55,9 @@
/**
* Implementation of the ScummVM file system API based on Windows API.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class WindowsFilesystemNode : public AbstractFilesystemNode {
+class WindowsFilesystemNode : public AbstractFSNode {
protected:
Common::String _displayName;
Common::String _path;
@@ -95,9 +95,9 @@ public:
virtual bool isReadable() const { return _access(_path.c_str(), R_OK) == 0; }
virtual bool isWritable() const { return _access(_path.c_str(), W_OK) == 0; }
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -142,8 +142,8 @@ void WindowsFilesystemNode::addFile(AbstractFSList &list, ListMode mode, const c
isDirectory = (find_data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ? true : false);
- if ((!isDirectory && mode == Common::FilesystemNode::kListDirectoriesOnly) ||
- (isDirectory && mode == Common::FilesystemNode::kListFilesOnly))
+ if ((!isDirectory && mode == Common::FSNode::kListDirectoriesOnly) ||
+ (isDirectory && mode == Common::FSNode::kListFilesOnly))
return;
entry._isDirectory = isDirectory;
@@ -223,7 +223,7 @@ WindowsFilesystemNode::WindowsFilesystemNode(const Common::String &p, const bool
_isPseudoRoot = false;
}
-AbstractFilesystemNode *WindowsFilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *WindowsFilesystemNode::getChild(const Common::String &n) const {
assert(_isDirectory);
Common::String newPath(_path);
@@ -285,7 +285,7 @@ bool WindowsFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
return true;
}
-AbstractFilesystemNode *WindowsFilesystemNode::getParent() const {
+AbstractFSNode *WindowsFilesystemNode::getParent() const {
assert(_isValid || _isPseudoRoot);
if (_isPseudoRoot)
diff --git a/backends/platform/dc/dc-fs.cpp b/backends/platform/dc/dc-fs.cpp
index 4baba5b7dc..d77e1c86df 100644
--- a/backends/platform/dc/dc-fs.cpp
+++ b/backends/platform/dc/dc-fs.cpp
@@ -33,9 +33,9 @@
/**
* Implementation of the ScummVM file system API based on Ronin.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class RoninCDFileNode : public AbstractFilesystemNode {
+class RoninCDFileNode : public AbstractFSNode {
protected:
Common::String _path;
@@ -49,14 +49,14 @@ public:
virtual bool isReadable() const { return true; }
virtual bool isWritable() const { return false; }
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const { return NULL; }
+ virtual AbstractFSNode *getChild(const Common::String &n) const { return NULL; }
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const { return false; }
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting() { return 0; }
- static AbstractFilesystemNode *makeFileNodePath(const Common::String &path);
+ static AbstractFSNode *makeFileNodePath(const Common::String &path);
};
/* A directory */
@@ -65,7 +65,7 @@ public:
RoninCDDirectoryNode(const Common::String &path) : RoninCDFileNode(path) {};
virtual bool isDirectory() const { return true; }
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual Common::SeekableReadStream *openForReading() { return 0; }
};
@@ -80,7 +80,7 @@ public:
virtual Common::SeekableReadStream *openForReading() { return 0; }
};
-AbstractFilesystemNode *RoninCDFileNode::makeFileNodePath(const Common::String &path) {
+AbstractFSNode *RoninCDFileNode::makeFileNodePath(const Common::String &path) {
assert(path.size() > 0);
int fd;
@@ -96,7 +96,7 @@ AbstractFilesystemNode *RoninCDFileNode::makeFileNodePath(const Common::String &
}
}
-AbstractFilesystemNode *RoninCDDirectoryNode::getChild(const Common::String &n) const {
+AbstractFSNode *RoninCDDirectoryNode::getChild(const Common::String &n) const {
Common::String newPath(_path);
if (_path.lastChar() != '/')
newPath += '/';
@@ -122,13 +122,13 @@ bool RoninCDDirectoryNode::getChildren(AbstractFSList &myList, ListMode mode, bo
if (dp->d_size < 0) {
// Honor the chosen mode
- if (mode == Common::FilesystemNode::kListFilesOnly)
+ if (mode == Common::FSNode::kListFilesOnly)
continue;
myList.push_back(new RoninCDDirectoryNode(newPath+"/"));
} else {
// Honor the chosen mode
- if (mode == Common::FilesystemNode::kListDirectoriesOnly)
+ if (mode == Common::FSNode::kListDirectoriesOnly)
continue;
myList.push_back(new RoninCDFileNode(newPath));
@@ -139,7 +139,7 @@ bool RoninCDDirectoryNode::getChildren(AbstractFSList &myList, ListMode mode, bo
return true;
}
-AbstractFilesystemNode *RoninCDFileNode::getParent() const {
+AbstractFSNode *RoninCDFileNode::getParent() const {
if (_path == "/")
return 0;
@@ -154,16 +154,16 @@ Common::SeekableReadStream *RoninCDFileNode::openForReading() {
return StdioStream::makeFromPath(getPath().c_str(), false);
}
-AbstractFilesystemNode *OSystem_Dreamcast::makeRootFileNode() const {
+AbstractFSNode *OSystem_Dreamcast::makeRootFileNode() const {
return new RoninCDDirectoryNode("/");
}
-AbstractFilesystemNode *OSystem_Dreamcast::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *OSystem_Dreamcast::makeCurrentDirectoryFileNode() const {
return makeRootFileNode();
}
-AbstractFilesystemNode *OSystem_Dreamcast::makeFileNodePath(const Common::String &path) const {
- AbstractFilesystemNode *node = RoninCDFileNode::makeFileNodePath(path);
+AbstractFSNode *OSystem_Dreamcast::makeFileNodePath(const Common::String &path) const {
+ AbstractFSNode *node = RoninCDFileNode::makeFileNodePath(path);
return (node? node : new RoninCDNonexistingNode(path));
}
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index 9dfd4c331e..54cd2e982b 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -189,9 +189,9 @@ class OSystem_Dreamcast : public OSystem, public FilesystemFactory {
// Filesystem
FilesystemFactory *getFilesystemFactory() { return this; }
- AbstractFilesystemNode *makeRootFileNode() const;
- AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ AbstractFSNode *makeRootFileNode() const;
+ AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ AbstractFSNode *makeFileNodePath(const Common::String &path) const;
private:
diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp
index 883787781a..f9646ff22f 100644
--- a/backends/platform/dc/selector.cpp
+++ b/backends/platform/dc/selector.cpp
@@ -146,12 +146,12 @@ struct Dir
{
char name[252];
char deficon[256];
- Common::FilesystemNode node;
+ Common::FSNode node;
};
static Game the_game;
-static bool isIcon(const Common::FilesystemNode &entry)
+static bool isIcon(const Common::FSNode &entry)
{
int l = entry.getDisplayName().size();
if (l>4 && !strcasecmp(entry.getDisplayName().c_str()+l-4, ".ICO"))
@@ -198,13 +198,13 @@ static int findGames(Game *games, int max)
{
Dir *dirs = new Dir[MAX_DIR];
int curr_game = 0, curr_dir = 0, num_dirs = 1;
- dirs[0].node = Common::FilesystemNode("");
+ dirs[0].node = Common::FSNode("");
while (curr_game < max && curr_dir < num_dirs) {
strncpy(dirs[curr_dir].name, dirs[curr_dir].node.getPath().c_str(), 252);
dirs[curr_dir].name[251] = '\0';
dirs[curr_dir].deficon[0] = '\0';
Common::FSList files, fslist;
- dirs[curr_dir++].node.getChildren(fslist, Common::FilesystemNode::kListAll);
+ dirs[curr_dir++].node.getChildren(fslist, Common::FSNode::kListAll);
for (Common::FSList::const_iterator entry = fslist.begin(); entry != fslist.end();
++entry) {
if (entry->isDirectory()) {
diff --git a/backends/platform/gp2x/gp2x.cpp b/backends/platform/gp2x/gp2x.cpp
index e5f062ed35..1fbda44077 100644
--- a/backends/platform/gp2x/gp2x.cpp
+++ b/backends/platform/gp2x/gp2x.cpp
@@ -145,6 +145,7 @@ void OSystem_GP2X::initBackend() {
if (mkdir(enginedataPath, 0755) != 0)
warning("mkdir for '%s' failed!", enginedataPath);
+ //FIXME: Do not use File::addDefaultDirectory, rather implement OSystem::addSysArchivesToSearchSet() !
Common::File::addDefaultDirectory(enginedataPath);
// Note: Review and clean this, it's OTT at the moment.
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index fdc1ba97f6..83637605a6 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -280,12 +280,12 @@ FilesystemFactory *OSystem_SDL::getFilesystemFactory() {
return _fsFactory;
}
-void OSystem_SDL::addSysArchivesToSearchSet(Common::SearchSet &s, uint priority) {
+void OSystem_SDL::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
#ifdef DATA_PATH
// Add the global DATA_PATH to the directory search list
// FIXME: We use depth = 4 for now, to match the old code. May want to change that
- Common::FilesystemNode dataNode(DATA_PATH);
+ Common::FSNode dataNode(DATA_PATH);
if (dataNode.exists() && dataNode.isDirectory()) {
Common::ArchivePtr dataArchive(new Common::FSDirectory(dataNode, 4));
s.add(DATA_PATH, dataArchive, priority);
@@ -378,12 +378,12 @@ static Common::String getDefaultConfigFileName() {
}
Common::SeekableReadStream *OSystem_SDL::openConfigFileForReading() {
- Common::FilesystemNode file(getDefaultConfigFileName());
+ Common::FSNode file(getDefaultConfigFileName());
return file.openForReading();
}
Common::WriteStream *OSystem_SDL::openConfigFileForWriting() {
- Common::FilesystemNode file(getDefaultConfigFileName());
+ Common::FSNode file(getDefaultConfigFileName());
return file.openForWriting();
}
diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h
index 3639d61c3a..3881e3777f 100644
--- a/backends/platform/sdl/sdl.h
+++ b/backends/platform/sdl/sdl.h
@@ -212,7 +212,7 @@ public:
virtual Common::SaveFileManager *getSavefileManager();
virtual FilesystemFactory *getFilesystemFactory();
- virtual void addSysArchivesToSearchSet(Common::SearchSet &s, uint priority = 0);
+ virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
virtual Common::SeekableReadStream *openConfigFileForReading();
virtual Common::WriteStream *openConfigFileForWriting();
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp
index 23876c5ec1..254b716927 100644
--- a/backends/platform/symbian/src/SymbianOS.cpp
+++ b/backends/platform/symbian/src/SymbianOS.cpp
@@ -124,12 +124,12 @@ static Common::String getDefaultConfigFileName() {
}
Common::SeekableReadStream *OSystem_SDL_Symbian::openConfigFileForReading() {
- Common::FilesystemNode file(getDefaultConfigFileName());
+ Common::FSNode file(getDefaultConfigFileName());
return file.openForReading();
}
Common::WriteStream *OSystem_SDL_Symbian::openConfigFileForWriting() {
- Common::FilesystemNode file(getDefaultConfigFileName());
+ Common::FSNode file(getDefaultConfigFileName());
return file.openForWriting();
}
diff --git a/backends/platform/wince/CELauncherDialog.cpp b/backends/platform/wince/CELauncherDialog.cpp
index 7e306be114..f0dfda5ee4 100644
--- a/backends/platform/wince/CELauncherDialog.cpp
+++ b/backends/platform/wince/CELauncherDialog.cpp
@@ -72,10 +72,10 @@ void CELauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 d
}
}
-void CELauncherDialog::automaticScanDirectory(const Common::FilesystemNode &node) {
+void CELauncherDialog::automaticScanDirectory(const Common::FSNode &node) {
// First check if we have a recognized game in the current directory
Common::FSList files;
- node.getChildren(files, Common::FilesystemNode::kListFilesOnly);
+ node.getChildren(files, Common::FSNode::kListFilesOnly);
// detect
GameList candidates(EngineMan.detectGames(files));
// insert
@@ -86,7 +86,7 @@ void CELauncherDialog::automaticScanDirectory(const Common::FilesystemNode &node
}
// Then recurse on the subdirectories
Common::FSList dirs;
- node.getChildren(dirs, Common::FilesystemNode::kListDirectoriesOnly);
+ node.getChildren(dirs, Common::FSNode::kListDirectoriesOnly);
for (Common::FSList::const_iterator currentDir = dirs.begin(); currentDir != dirs.end(); ++currentDir)
automaticScanDirectory(*currentDir);
diff --git a/backends/platform/wince/CELauncherDialog.h b/backends/platform/wince/CELauncherDialog.h
index a5f3fd0d43..7e86f808fc 100644
--- a/backends/platform/wince/CELauncherDialog.h
+++ b/backends/platform/wince/CELauncherDialog.h
@@ -36,7 +36,7 @@ public:
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
protected:
void addGame();
- void automaticScanDirectory(const Common::FilesystemNode &node);
+ void automaticScanDirectory(const Common::FSNode &node);
};
typedef GUI::LauncherDialog GUILauncherDialog;
diff --git a/backends/plugins/dc/dc-provider.cpp b/backends/plugins/dc/dc-provider.cpp
index 9b150c8db4..f73af3854b 100644
--- a/backends/plugins/dc/dc-provider.cpp
+++ b/backends/plugins/dc/dc-provider.cpp
@@ -27,6 +27,7 @@
#include "backends/plugins/dc/dc-provider.h"
#include "backends/plugins/dynamic-plugin.h"
+#include "common/fs.h"
#include "dcloader.h"
@@ -83,12 +84,13 @@ public:
};
-Plugin* DCPluginProvider::createPlugin(const Common::String &filename) const {
- return new DCPlugin(filename);
+Plugin* DCPluginProvider::createPlugin(const Common::FSNode &node) const {
+ return new DCPlugin(node.getPath());
}
-bool DCPluginProvider::isPluginFilename(const Common::String &filename) const {
+bool DCPluginProvider::isPluginFilename(const Common::FSNode &node) const {
// Check the plugin suffix
+ Common::String filename = node.getName();
if (!filename.hasSuffix(".PLG"))
return false;
diff --git a/backends/plugins/dc/dc-provider.h b/backends/plugins/dc/dc-provider.h
index f413061828..470a586a51 100644
--- a/backends/plugins/dc/dc-provider.h
+++ b/backends/plugins/dc/dc-provider.h
@@ -32,9 +32,9 @@
class DCPluginProvider : public FilePluginProvider {
protected:
- Plugin* createPlugin(const Common::String &filename) const;
+ Plugin* createPlugin(const Common::FSNode &node) const;
- bool isPluginFilename(const Common::String &filename) const;
+ bool isPluginFilename(const Common::FSNode &node) const;
virtual void addCustomDirectories(Common::StringList &dirs) const {
dirs.push_back("/");
diff --git a/backends/plugins/posix/posix-provider.cpp b/backends/plugins/posix/posix-provider.cpp
index 39847e53bf..7dd25ddd67 100644
--- a/backends/plugins/posix/posix-provider.cpp
+++ b/backends/plugins/posix/posix-provider.cpp
@@ -27,6 +27,7 @@
#include "backends/plugins/posix/posix-provider.h"
#include "backends/plugins/dynamic-plugin.h"
+#include "common/fs.h"
#include <dlfcn.h>
@@ -78,8 +79,8 @@ public:
};
-Plugin* POSIXPluginProvider::createPlugin(const Common::String &filename) const {
- return new POSIXPlugin(filename);
+Plugin* POSIXPluginProvider::createPlugin(const Common::FSNode &node) const {
+ return new POSIXPlugin(node.getPath());
}
diff --git a/backends/plugins/posix/posix-provider.h b/backends/plugins/posix/posix-provider.h
index 40c16b3e11..b7d8c9f945 100644
--- a/backends/plugins/posix/posix-provider.h
+++ b/backends/plugins/posix/posix-provider.h
@@ -32,7 +32,7 @@
class POSIXPluginProvider : public FilePluginProvider {
protected:
- Plugin* createPlugin(const Common::String &filename) const;
+ Plugin* createPlugin(const Common::FSNode &node) const;
};
#endif // defined(DYNAMIC_MODULES) && defined(UNIX)
diff --git a/backends/plugins/sdl/sdl-provider.cpp b/backends/plugins/sdl/sdl-provider.cpp
index 6df1dec680..be04b5a1eb 100644
--- a/backends/plugins/sdl/sdl-provider.cpp
+++ b/backends/plugins/sdl/sdl-provider.cpp
@@ -27,6 +27,7 @@
#include "backends/plugins/sdl/sdl-provider.h"
#include "backends/plugins/dynamic-plugin.h"
+#include "common/fs.h"
#include "SDL.h"
#include "SDL_loadso.h"
@@ -78,8 +79,8 @@ public:
};
-Plugin* SDLPluginProvider::createPlugin(const Common::String &filename) const {
- return new SDLPlugin(filename);
+Plugin* SDLPluginProvider::createPlugin(const Common::FSNode &node) const {
+ return new SDLPlugin(node.getPath());
}
diff --git a/backends/plugins/sdl/sdl-provider.h b/backends/plugins/sdl/sdl-provider.h
index a9ec657e33..b546b028a2 100644
--- a/backends/plugins/sdl/sdl-provider.h
+++ b/backends/plugins/sdl/sdl-provider.h
@@ -32,7 +32,7 @@
class SDLPluginProvider : public FilePluginProvider {
protected:
- Plugin* createPlugin(const Common::String &filename) const;
+ Plugin* createPlugin(const Common::FSNode &node) const;
};
#endif // defined(DYNAMIC_MODULES) && defined(UNIX)
diff --git a/backends/plugins/win32/win32-provider.cpp b/backends/plugins/win32/win32-provider.cpp
index b8fdd3d802..c77d31282d 100644
--- a/backends/plugins/win32/win32-provider.cpp
+++ b/backends/plugins/win32/win32-provider.cpp
@@ -27,6 +27,7 @@
#include "backends/plugins/win32/win32-provider.h"
#include "backends/plugins/dynamic-plugin.h"
+#include "common/fs.h"
#include <windows.h>
@@ -96,12 +97,13 @@ public:
};
-Plugin* Win32PluginProvider::createPlugin(const Common::String &filename) const {
- return new Win32Plugin(filename);
+Plugin* Win32PluginProvider::createPlugin(const Common::FSNode &node) const {
+ return new Win32Plugin(node.getPath());
}
-bool Win32PluginProvider::isPluginFilename(const Common::String &filename) const {
+bool Win32PluginProvider::isPluginFilename(const Common::FSNode &node) const {
// Check the plugin suffix
+ Common::String filename = node.getName();
if (!filename.hasSuffix(".dll"))
return false;
diff --git a/backends/plugins/win32/win32-provider.h b/backends/plugins/win32/win32-provider.h
index 4ddc8b7500..d6e146371a 100644
--- a/backends/plugins/win32/win32-provider.h
+++ b/backends/plugins/win32/win32-provider.h
@@ -32,9 +32,9 @@
class Win32PluginProvider : public FilePluginProvider {
protected:
- Plugin* createPlugin(const Common::String &filename) const;
+ Plugin* createPlugin(const Common::FSNode &node) const;
- bool isPluginFilename(const Common::String &filename) const;
+ bool isPluginFilename(const Common::FSNode &node) const;
virtual void addCustomDirectories(Common::StringList &dirs) const {}
};
diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp
index 0cfd265890..f35606f793 100644
--- a/backends/saves/default/default-saves.cpp
+++ b/backends/saves/default/default-saves.cpp
@@ -71,7 +71,7 @@ DefaultSaveFileManager::DefaultSaveFileManager(const Common::String &defaultSave
Common::StringList DefaultSaveFileManager::listSavefiles(const char *pattern) {
- Common::FilesystemNode savePath(getSavePath());
+ Common::FSNode savePath(getSavePath());
Common::FSList savefiles;
Common::StringList results;
Common::String search(pattern);
@@ -85,7 +85,7 @@ Common::StringList DefaultSaveFileManager::listSavefiles(const char *pattern) {
return results;
}
-void DefaultSaveFileManager::checkPath(const Common::FilesystemNode &dir) {
+void DefaultSaveFileManager::checkPath(const Common::FSNode &dir) {
const Common::String path = dir.getPath();
clearError();
@@ -152,7 +152,7 @@ void DefaultSaveFileManager::checkPath(const Common::FilesystemNode &dir) {
#else
if (!dir.exists()) {
// TODO: We could try to mkdir the directory here; or rather, we could
- // add a mkdir method to FilesystemNode and invoke that here.
+ // add a mkdir method to FSNode and invoke that here.
setError(SFM_DIR_NOENT, "A component of the path does not exist, or the path is an empty string: "+path);
} else if (!dir.isDirectory()) {
setError(SFM_DIR_NOTDIR, "The given savepath is not a directory: "+path);
@@ -162,11 +162,11 @@ void DefaultSaveFileManager::checkPath(const Common::FilesystemNode &dir) {
Common::InSaveFile *DefaultSaveFileManager::openForLoading(const char *filename) {
// Ensure that the savepath is valid. If not, generate an appropriate error.
- Common::FilesystemNode savePath(getSavePath());
+ Common::FSNode savePath(getSavePath());
checkPath(savePath);
if (getError() == SFM_NO_ERROR) {
- Common::FilesystemNode file = savePath.getChild(filename);
+ Common::FSNode file = savePath.getChild(filename);
// Open the file for reading
Common::SeekableReadStream *sf = file.openForReading();
@@ -179,11 +179,11 @@ Common::InSaveFile *DefaultSaveFileManager::openForLoading(const char *filename)
Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const char *filename) {
// Ensure that the savepath is valid. If not, generate an appropriate error.
- Common::FilesystemNode savePath(getSavePath());
+ Common::FSNode savePath(getSavePath());
checkPath(savePath);
if (getError() == SFM_NO_ERROR) {
- Common::FilesystemNode file = savePath.getChild(filename);
+ Common::FSNode file = savePath.getChild(filename);
// Open the file for saving
Common::WriteStream *sf = file.openForWriting();
@@ -197,10 +197,10 @@ Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const char *filename)
bool DefaultSaveFileManager::removeSavefile(const char *filename) {
clearError();
- Common::FilesystemNode savePath(getSavePath());
- Common::FilesystemNode file = savePath.getChild(filename);
+ Common::FSNode savePath(getSavePath());
+ Common::FSNode file = savePath.getChild(filename);
- // TODO: Add new method FilesystemNode::remove()
+ // TODO: Add new method FSNode::remove()
if (remove(file.getPath().c_str()) != 0) {
#ifndef _WIN32_WCE
if (errno == EACCES)
diff --git a/backends/saves/default/default-saves.h b/backends/saves/default/default-saves.h
index c02ce588c2..7e3c23f5ae 100644
--- a/backends/saves/default/default-saves.h
+++ b/backends/saves/default/default-saves.h
@@ -55,7 +55,7 @@ protected:
* Checks the given path for read access, existence, etc.
* Sets the internal error and error message accordingly.
*/
- void checkPath(const Common::FilesystemNode &dir);
+ void checkPath(const Common::FSNode &dir);
};
#endif