aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorDavid Corrales2007-06-05 21:02:35 +0000
committerDavid Corrales2007-06-05 21:02:35 +0000
commit3b96c7fad54ff7f5000667be494e50e7ca11e69a (patch)
tree265263a7fc44ca51c2391e929e7c4fd0da676315 /engines
parent716bcd0b2bcd4d04489bc2fc23a948fad3e2c02a (diff)
downloadscummvm-rg350-3b96c7fad54ff7f5000667be494e50e7ca11e69a.tar.gz
scummvm-rg350-3b96c7fad54ff7f5000667be494e50e7ca11e69a.tar.bz2
scummvm-rg350-3b96c7fad54ff7f5000667be494e50e7ca11e69a.zip
Renamed methods in the FilesystemNode class to match the AbstractFSNode implementations.
Also exposed the new methods (exists, isReadable and isWritable) in FilesystemNode. svn-id: r27113
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/agi_v3.cpp6
-rw-r--r--engines/agi/detection.cpp2
-rw-r--r--engines/kyra/resource.cpp10
-rw-r--r--engines/queen/queen.cpp2
-rw-r--r--engines/scumm/detection.cpp10
-rw-r--r--engines/sky/sky.cpp6
-rw-r--r--engines/sword1/sword1.cpp6
-rw-r--r--engines/sword2/sword2.cpp8
8 files changed, 25 insertions, 25 deletions
diff --git a/engines/agi/agi_v3.cpp b/engines/agi/agi_v3.cpp
index 3e90dc11f1..33f670e779 100644
--- a/engines/agi/agi_v3.cpp
+++ b/engines/agi/agi_v3.cpp
@@ -52,14 +52,14 @@ int AgiLoader_v3::detectGame() {
FSList fslist;
FilesystemNode dir(ConfMan.get("path"));
- if (!dir.listDir(fslist, FilesystemNode::kListFilesOnly)) {
- warning("AgiEngine: invalid game path '%s'", dir.path().c_str());
+ if (!dir.getChildren(fslist, FilesystemNode::kListFilesOnly)) {
+ warning("AgiEngine: invalid game path '%s'", dir.getPath().c_str());
return errInvalidAGIFile;
}
for (FSList::const_iterator file = fslist.begin();
file != fslist.end() && !found; ++file) {
- Common::String f = file->name();
+ Common::String f = file->getName();
f.toLowercase();
if (f.hasSuffix("vol.0")) {
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index 9f6f0e7156..b7f8c12730 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -1885,7 +1885,7 @@ Common::ADGameDescList fallbackDetector(const FSList *fslist) {
// First grab all filenames
for (FSList::const_iterator file = fslist->begin(); file != fslist->end(); ++file) {
if (file->isDirectory()) continue;
- tstr = file->name();
+ tstr = file->getName();
tstr.toLowercase();
allFiles[tstr] = true;
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index 7c15cee2f9..319845c22c 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -82,8 +82,8 @@ Resource::Resource(KyraEngine *vm) {
FSList fslist;
FilesystemNode dir(ConfMan.get("path"));
- if (!dir.listDir(fslist, FilesystemNode::kListFilesOnly))
- error("invalid game path '%s'", dir.path().c_str());
+ if (!dir.getChildren(fslist, FilesystemNode::kListFilesOnly))
+ error("invalid game path '%s'", dir.getPath().c_str());
if (_vm->game() == GI_KYRA1 && _vm->gameFlags().isTalkie) {
static const char *list[] = {
@@ -96,7 +96,7 @@ Resource::Resource(KyraEngine *vm) {
Common::for_each(_pakfiles.begin(), _pakfiles.end(), Common::bind2nd(Common::mem_fun(&ResourceFile::protect), true));
} else {
for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
- Common::String filename = file->name();
+ Common::String filename = file->getName();
filename.toUppercase();
// No real PAK file!
@@ -104,8 +104,8 @@ Resource::Resource(KyraEngine *vm) {
continue;
if (filename.hasSuffix("PAK") || filename.hasSuffix("APK")) {
- if (!loadPakFile(file->name()))
- error("couldn't open pakfile '%s'", file->name().c_str());
+ if (!loadPakFile(file->getName()))
+ error("couldn't open pakfile '%s'", file->getName().c_str());
}
}
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp
index bbb186d0ae..c1e909ffdb 100644
--- a/engines/queen/queen.cpp
+++ b/engines/queen/queen.cpp
@@ -73,7 +73,7 @@ GameList Engine_QUEEN_detectGames(const FSList &fslist) {
if (file->isDirectory()) {
continue;
}
- if (file->name().equalsIgnoreCase("queen.1") || file->name().equalsIgnoreCase("queen.1c")) {
+ if (file->getName().equalsIgnoreCase("queen.1") || file->getName().equalsIgnoreCase("queen.1c")) {
Common::File dataFile;
if (!dataFile.open(*file)) {
continue;
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index f60908d3ed..217b257e5e 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -205,7 +205,7 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com
// the first match is used.
static bool searchFSNode(const FSList &fslist, const Common::String &name, FilesystemNode &result) {
for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
- if (!scumm_stricmp(file->name().c_str(), name.c_str())) {
+ if (!scumm_stricmp(file->getName().c_str(), name.c_str())) {
result = *file;
return true;
}
@@ -231,7 +231,7 @@ static Common::Language detectLanguage(const FSList &fslist, byte id) {
FSList tmpList;
if (searchFSNode(fslist, "RESOURCE", resDir)
&& resDir.isDirectory()
- && resDir.listDir(tmpList, FilesystemNode::kListFilesOnly)
+ && resDir.getChildren(tmpList, FilesystemNode::kListFilesOnly)
&& searchFSNode(tmpList, filename, langFile)) {
tmp.open(langFile);
}
@@ -328,7 +328,7 @@ static void detectGames(const FSList &fslist, Common::List<DetectorResult> &resu
DetectorDesc d;
d.node = *file;
d.md5Entry = 0;
- fileMD5Map[file->name()] = d;
+ fileMD5Map[file->getName()] = d;
}
}
@@ -455,7 +455,7 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com
Common::File tmp;
if (!tmp.open(d.node)) {
- warning("SCUMM detectGames: failed to open '%s' for read access", d.node.path().c_str());
+ warning("SCUMM detectGames: failed to open '%s' for read access", d.node.getPath().c_str());
return false;
}
@@ -784,7 +784,7 @@ PluginError Engine_SCUMM_create(OSystem *syst, Engine **engine) {
// Fetch the list of files in the current directory
FSList fslist;
FilesystemNode dir(ConfMan.get("path"));
- if (!dir.listDir(fslist, FilesystemNode::kListFilesOnly)) {
+ if (!dir.getChildren(fslist, FilesystemNode::kListFilesOnly)) {
return kInvalidPathError;
}
diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp
index 84038990aa..d8e642d717 100644
--- a/engines/sky/sky.cpp
+++ b/engines/sky/sky.cpp
@@ -124,11 +124,11 @@ GameList Engine_SKY_detectGames(const FSList &fslist) {
// Iterate over all files in the given directory
for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
if (!file->isDirectory()) {
- const char *fileName = file->name().c_str();
+ const char *fileName = file->getName().c_str();
if (0 == scumm_stricmp("sky.dsk", fileName)) {
Common::File dataDisk;
- if (dataDisk.open(file->path())) {
+ if (dataDisk.open(file->getPath())) {
hasSkyDsk = true;
dataDiskSize = dataDisk.size();
}
@@ -136,7 +136,7 @@ GameList Engine_SKY_detectGames(const FSList &fslist) {
if (0 == scumm_stricmp("sky.dnr", fileName)) {
Common::File dinner;
- if (dinner.open(file->path())) {
+ if (dinner.open(file->getPath())) {
hasSkyDnr = true;
dinnerTableEntries = dinner.readUint32LE();
}
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 97e518421c..db978cd33e 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -107,15 +107,15 @@ GameDescriptor Engine_SWORD1_findGameID(const char *gameid) {
void Sword1CheckDirectory(const FSList &fslist, bool *filesFound) {
for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
if (!file->isDirectory()) {
- const char *fileName = file->name().c_str();
+ const char *fileName = file->getName().c_str();
for (int cnt = 0; cnt < NUM_FILES_TO_CHECK; cnt++)
if (scumm_stricmp(fileName, g_filesToCheck[cnt]) == 0)
filesFound[cnt] = true;
} else {
for (int cnt = 0; cnt < ARRAYSIZE(g_dirNames); cnt++)
- if (scumm_stricmp(file->name().c_str(), g_dirNames[cnt]) == 0) {
+ if (scumm_stricmp(file->getName().c_str(), g_dirNames[cnt]) == 0) {
FSList fslist2;
- if (file->listDir(fslist2, FilesystemNode::kListFilesOnly))
+ if (file->getChildren(fslist2, FilesystemNode::kListFilesOnly))
Sword1CheckDirectory(fslist2, filesFound);
}
}
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 280beb7c22..be240e5956 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -101,7 +101,7 @@ GameList Engine_SWORD2_detectGames(const FSList &fslist) {
// Iterate over all files in the given directory
for (file = fslist.begin(); file != fslist.end(); ++file) {
if (!file->isDirectory()) {
- const char *fileName = file->name().c_str();
+ const char *fileName = file->getName().c_str();
if (0 == scumm_stricmp(g->detectname, fileName)) {
// Match found, add to list of candidates, then abort inner loop.
@@ -118,11 +118,11 @@ GameList Engine_SWORD2_detectGames(const FSList &fslist) {
// present e.g. if the user copied the data straight from CD.
for (file = fslist.begin(); file != fslist.end(); ++file) {
if (file->isDirectory()) {
- const char *fileName = file->name().c_str();
+ const char *fileName = file->getName().c_str();
if (0 == scumm_stricmp("clusters", fileName)) {
FSList recList;
- if (file->listDir(recList, FilesystemNode::kListAll)) {
+ if (file->getChildren(recList, FilesystemNode::kListAll)) {
GameList recGames(Engine_SWORD2_detectGames(recList));
if (!recGames.empty()) {
detectedGames.push_back(recGames);
@@ -144,7 +144,7 @@ PluginError Engine_SWORD2_create(OSystem *syst, Engine **engine) {
FSList fslist;
FilesystemNode dir(ConfMan.get("path"));
- if (!dir.listDir(fslist, FilesystemNode::kListAll)) {
+ if (!dir.getChildren(fslist, FilesystemNode::kListAll)) {
return kInvalidPathError;
}