summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/archive.cpp
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-10-29 06:52:56 +0100
committerarchshift <admin@archshift.com>2014-11-02 19:48:28 +0100
commit04c90c395d27e6bc205fb2d933ced50e70c1841a (patch)
tree18f5e206016e383ad07493e3ad5ba1279301e6a8 /src/core/hle/kernel/archive.cpp
parentMerge pull request #178 from archshift/errf (diff)
downloadyuzu-04c90c395d27e6bc205fb2d933ced50e70c1841a.tar
yuzu-04c90c395d27e6bc205fb2d933ced50e70c1841a.tar.gz
yuzu-04c90c395d27e6bc205fb2d933ced50e70c1841a.tar.bz2
yuzu-04c90c395d27e6bc205fb2d933ced50e70c1841a.tar.lz
yuzu-04c90c395d27e6bc205fb2d933ced50e70c1841a.tar.xz
yuzu-04c90c395d27e6bc205fb2d933ced50e70c1841a.tar.zst
yuzu-04c90c395d27e6bc205fb2d933ced50e70c1841a.zip
Diffstat (limited to 'src/core/hle/kernel/archive.cpp')
-rw-r--r--src/core/hle/kernel/archive.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/hle/kernel/archive.cpp b/src/core/hle/kernel/archive.cpp
index 4a6140c71..764082d71 100644
--- a/src/core/hle/kernel/archive.cpp
+++ b/src/core/hle/kernel/archive.cpp
@@ -381,6 +381,21 @@ Handle OpenFileFromArchive(Handle archive_handle, const std::string& path, const
}
/**
+ * Create a Directory from an Archive
+ * @param archive_handle Handle to an open Archive object
+ * @param path Path to the Directory inside of the Archive
+ * @return Opened Directory object
+ */
+Result CreateDirectoryFromArchive(Handle archive_handle, const std::string& path) {
+ Archive* archive = Kernel::g_object_pool.GetFast<Archive>(archive_handle);
+ if (archive == nullptr)
+ return -1;
+ if (archive->backend->CreateDirectory(path))
+ return 0;
+ return -1;
+}
+
+/**
* Open a Directory from an Archive
* @param archive_handle Handle to an open Archive object
* @param path Path to the Directory inside of the Archive