diff options
author | DeeJayBro <maricrafterminecraft@gmail.com> | 2018-10-27 09:55:26 +0200 |
---|---|---|
committer | DeeJayBro <maricrafterminecraft@gmail.com> | 2018-10-27 11:56:39 +0200 |
commit | 3b1e4c099548d0b6fcfa83cd2f1c5dc24346c761 (patch) | |
tree | ba0bf60eedcd135819043da876dc19225a45be80 /src/core/hle/service | |
parent | Merge pull request #1533 from FernandoS27/lmem (diff) | |
download | yuzu-3b1e4c099548d0b6fcfa83cd2f1c5dc24346c761.tar yuzu-3b1e4c099548d0b6fcfa83cd2f1c5dc24346c761.tar.gz yuzu-3b1e4c099548d0b6fcfa83cd2f1c5dc24346c761.tar.bz2 yuzu-3b1e4c099548d0b6fcfa83cd2f1c5dc24346c761.tar.lz yuzu-3b1e4c099548d0b6fcfa83cd2f1c5dc24346c761.tar.xz yuzu-3b1e4c099548d0b6fcfa83cd2f1c5dc24346c761.tar.zst yuzu-3b1e4c099548d0b6fcfa83cd2f1c5dc24346c761.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index c87721c39..c1c83a11d 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -273,8 +273,8 @@ public: {0, &IFileSystem::CreateFile, "CreateFile"}, {1, &IFileSystem::DeleteFile, "DeleteFile"}, {2, &IFileSystem::CreateDirectory, "CreateDirectory"}, - {3, nullptr, "DeleteDirectory"}, - {4, nullptr, "DeleteDirectoryRecursively"}, + {3, &IFileSystem::DeleteDirectory, "DeleteDirectory"}, + {4, &IFileSystem::DeleteDirectoryRecursively, "DeleteDirectoryRecursively"}, {5, &IFileSystem::RenameFile, "RenameFile"}, {6, nullptr, "RenameDirectory"}, {7, &IFileSystem::GetEntryType, "GetEntryType"}, @@ -329,6 +329,30 @@ public: rb.Push(backend.CreateDirectory(name)); } + void DeleteDirectory(Kernel::HLERequestContext& ctx) { + const IPC::RequestParser rp{ctx}; + + const auto file_buffer = ctx.ReadBuffer(); + std::string name = Common::StringFromBuffer(file_buffer); + + LOG_DEBUG(Service_FS, "called directory {}", name); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(backend.DeleteDirectory(name)); + } + + void DeleteDirectoryRecursively(Kernel::HLERequestContext& ctx) { + const IPC::RequestParser rp{ctx}; + + const auto file_buffer = ctx.ReadBuffer(); + std::string name = Common::StringFromBuffer(file_buffer); + + LOG_DEBUG(Service_FS, "called directory {}", name); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(backend.DeleteDirectoryRecursively(name)); + } + void RenameFile(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; |