aboutsummaryrefslogtreecommitdiff
path: root/backends/fs
diff options
context:
space:
mode:
authorCameron Cawley2019-08-06 17:42:43 +0100
committerEugene Sandulenko2019-08-26 11:38:47 +0200
commit196b33bb7f6b04d42c36bf459b675233b34604ec (patch)
tree12a19ac1d23f9dc06c31005e51d05dbb7c85fbcb /backends/fs
parent5f901676ff0e9007f74a80327e787ae424cfd063 (diff)
downloadscummvm-rg350-196b33bb7f6b04d42c36bf459b675233b34604ec.tar.gz
scummvm-rg350-196b33bb7f6b04d42c36bf459b675233b34604ec.tar.bz2
scummvm-rg350-196b33bb7f6b04d42c36bf459b675233b34604ec.zip
PSP: Implement AbstractFSNode::createDirectory()
Diffstat (limited to 'backends/fs')
-rw-r--r--backends/fs/psp/psp-fs.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp
index e79d07d64a..34727a6392 100644
--- a/backends/fs/psp/psp-fs.cpp
+++ b/backends/fs/psp/psp-fs.cpp
@@ -240,7 +240,21 @@ Common::WriteStream *PSPFilesystemNode::createWriteStream() {
}
bool PSPFilesystemNode::createDirectory() {
- warning("PSPFilesystemNode::createDirectory(): Not supported");
+ DEBUG_ENTER_FUNC();
+
+ if (PowerMan.beginCriticalSection() == PowerManager::Blocked)
+ PSP_DEBUG_PRINT_FUNC("Suspended\n"); // Make sure to block in case of suspend
+
+ PSP_DEBUG_PRINT_FUNC("path [%s]\n", _path.c_str());
+
+ if (sceIoMkdir(_path.c_str(), 0777) == 0) {
+ struct stat st;
+ _isValid = (0 == stat(_path.c_str(), &st));
+ _isDirectory = S_ISDIR(st.st_mode);
+ }
+
+ PowerMan.endCriticalSection();
+
return _isValid && _isDirectory;
}