aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.cpp4
-rw-r--r--backends/fs/chroot/chroot-fs.cpp3
-rw-r--r--backends/fs/ds/ds-fs.cpp7
-rw-r--r--backends/fs/n64/n64-fs.cpp3
-rw-r--r--backends/fs/ps2/ps2-fs.cpp4
-rw-r--r--backends/fs/psp/psp-fs.cpp4
-rw-r--r--backends/fs/symbian/symbian-fs.cpp4
-rw-r--r--backends/fs/wii/wii-fs.cpp4
-rw-r--r--backends/platform/dc/dc-fs.cpp1
-rw-r--r--backends/platform/tizen/fs.cpp5
-rw-r--r--backends/platform/tizen/fs.h1
11 files changed, 22 insertions, 18 deletions
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index fa0ea1453d..3561303b6d 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -444,8 +444,8 @@ Common::WriteStream *AmigaOSFilesystemNode::createWriteStream() {
}
bool AmigaOSFilesystemNode::createDirectory() {
- error("Not supported");
- return false;
+ warning("AmigaOSFilesystemNode::createDirectory(): Not supported");
+ return _bIsValid && _bIsDirectory;
}
#endif //defined(__amigaos4__)
diff --git a/backends/fs/chroot/chroot-fs.cpp b/backends/fs/chroot/chroot-fs.cpp
index 0fdd14ca9a..bd1f93ae77 100644
--- a/backends/fs/chroot/chroot-fs.cpp
+++ b/backends/fs/chroot/chroot-fs.cpp
@@ -101,8 +101,7 @@ Common::WriteStream *ChRootFilesystemNode::createWriteStream() {
}
bool ChRootFilesystemNode::createDirectory() {
- error("Not supported");
- return false;
+ return _realNode->createDirectory();
}
Common::String ChRootFilesystemNode::addPathComponent(const Common::String &path, const Common::String &component) {
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp
index 8498a77751..64430f3fe5 100644
--- a/backends/fs/ds/ds-fs.cpp
+++ b/backends/fs/ds/ds-fs.cpp
@@ -212,8 +212,7 @@ Common::WriteStream *DSFileSystemNode::createWriteStream() {
}
bool DSFileSystemNode::createDirectory() {
- error("Not supported");
- return false;
+ return _isValid && _isDirectory;
}
//////////////////////////////////////////////////////////////////////////
@@ -399,8 +398,8 @@ Common::WriteStream *GBAMPFileSystemNode::createWriteStream() {
}
bool GBAMPFileSystemNode::createDirectory() {
- error("Not supported");
- return false;
+ warning("GBAMPFileSystemNode::createDirectory(): Not supported");
+ return _isValid && _isDirectory;
}
diff --git a/backends/fs/n64/n64-fs.cpp b/backends/fs/n64/n64-fs.cpp
index 4a21fb27c4..5049334ccc 100644
--- a/backends/fs/n64/n64-fs.cpp
+++ b/backends/fs/n64/n64-fs.cpp
@@ -161,8 +161,7 @@ Common::WriteStream *N64FilesystemNode::createWriteStream() {
}
bool N64FilesystemNode::createDirectory() {
- error("Not supported");
- return false;
+ return _isValid && _isDirectory;
}
#endif //#ifdef __N64__
diff --git a/backends/fs/ps2/ps2-fs.cpp b/backends/fs/ps2/ps2-fs.cpp
index ec75f1e2d2..80382d2a85 100644
--- a/backends/fs/ps2/ps2-fs.cpp
+++ b/backends/fs/ps2/ps2-fs.cpp
@@ -444,8 +444,8 @@ Common::WriteStream *Ps2FilesystemNode::createWriteStream() {
}
bool Ps2FilesystemNode::createDirectory() {
- error("Not supported");
- return false;
+ warning("Ps2FilesystemNode::createDirectory(): Not supported");
+ return _isHere && _isDirectory;
}
#endif
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp
index 01884dea97..e79d07d64a 100644
--- a/backends/fs/psp/psp-fs.cpp
+++ b/backends/fs/psp/psp-fs.cpp
@@ -240,8 +240,8 @@ Common::WriteStream *PSPFilesystemNode::createWriteStream() {
}
bool PSPFilesystemNode::createDirectory() {
- error("Not supported");
- return false;
+ warning("PSPFilesystemNode::createDirectory(): Not supported");
+ return _isValid && _isDirectory;
}
#endif //#ifdef __PSP__
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp
index 7759f329d7..96fa84aa95 100644
--- a/backends/fs/symbian/symbian-fs.cpp
+++ b/backends/fs/symbian/symbian-fs.cpp
@@ -233,8 +233,8 @@ Common::WriteStream *SymbianFilesystemNode::createWriteStream() {
}
bool SymbianFilesystemNode::createDirectory() {
- error("Not supported");
- return false;
+ warning("SymbianFilesystemNode::createDirectory(): Not supported");
+ return _isValid && _isDirectory;
}
#endif //#if defined(__SYMBIAN32__)
diff --git a/backends/fs/wii/wii-fs.cpp b/backends/fs/wii/wii-fs.cpp
index 3b276e9838..c54cdeffd8 100644
--- a/backends/fs/wii/wii-fs.cpp
+++ b/backends/fs/wii/wii-fs.cpp
@@ -214,8 +214,8 @@ Common::WriteStream *WiiFilesystemNode::createWriteStream() {
}
bool WiiFilesystemNode::createDirectory() {
- error("Not supported");
- return false;
+ warning("WiiFilesystemNode::createDirectory(): Not supported");
+ return _exists && _isDirectory;
}
#endif //#if defined(__WII__)
diff --git a/backends/platform/dc/dc-fs.cpp b/backends/platform/dc/dc-fs.cpp
index bfed8a7853..43d9a9e836 100644
--- a/backends/platform/dc/dc-fs.cpp
+++ b/backends/platform/dc/dc-fs.cpp
@@ -71,6 +71,7 @@ public:
virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual Common::SeekableReadStream *createReadStream() { return 0; }
+ virtual bool createDirectory() { return true; }
};
/* A file/directory which does not exist */
diff --git a/backends/platform/tizen/fs.cpp b/backends/platform/tizen/fs.cpp
index c6cd8f0a71..1827b7d4c1 100644
--- a/backends/platform/tizen/fs.cpp
+++ b/backends/platform/tizen/fs.cpp
@@ -439,3 +439,8 @@ Common::WriteStream *TizenFilesystemNode::createWriteStream() {
}
return result;
}
+
+bool TizenFilesystemNode::createDirectory() {
+ warning("TizenFilesystemNode::createDirectory(): Not supported");
+ return _isValid && isDirectory();
+}
diff --git a/backends/platform/tizen/fs.h b/backends/platform/tizen/fs.h
index 8c1677fa7b..1da226b1a6 100644
--- a/backends/platform/tizen/fs.h
+++ b/backends/platform/tizen/fs.h
@@ -83,6 +83,7 @@ public:
Common::SeekableReadStream *createReadStream();
Common::WriteStream *createWriteStream();
+ bool createDirectory();
protected:
TizenFilesystemNode(const Common::String &root, const Common::String &p);