diff options
| author | 2014-10-28 22:52:56 -0700 | |
|---|---|---|
| committer | 2014-11-02 10:48:28 -0800 | |
| commit | 04c90c395d27e6bc205fb2d933ced50e70c1841a (patch) | |
| tree | 18f5e206016e383ad07493e3ad5ba1279301e6a8 /src/core/hle/kernel/archive.cpp | |
| parent | Merge pull request #178 from archshift/errf (diff) | |
| download | yuzu-04c90c395d27e6bc205fb2d933ced50e70c1841a.tar.gz yuzu-04c90c395d27e6bc205fb2d933ced50e70c1841a.tar.xz yuzu-04c90c395d27e6bc205fb2d933ced50e70c1841a.zip | |
Added CreateDirectory function to service/fs.cpp, and in Archive.
Diffstat (limited to 'src/core/hle/kernel/archive.cpp')
| -rw-r--r-- | src/core/hle/kernel/archive.cpp | 15 |
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 | |||
| 381 | } | 381 | } |
| 382 | 382 | ||
| 383 | /** | 383 | /** |
| 384 | * Create a Directory from an Archive | ||
| 385 | * @param archive_handle Handle to an open Archive object | ||
| 386 | * @param path Path to the Directory inside of the Archive | ||
| 387 | * @return Opened Directory object | ||
| 388 | */ | ||
| 389 | Result CreateDirectoryFromArchive(Handle archive_handle, const std::string& path) { | ||
| 390 | Archive* archive = Kernel::g_object_pool.GetFast<Archive>(archive_handle); | ||
| 391 | if (archive == nullptr) | ||
| 392 | return -1; | ||
| 393 | if (archive->backend->CreateDirectory(path)) | ||
| 394 | return 0; | ||
| 395 | return -1; | ||
| 396 | } | ||
| 397 | |||
| 398 | /** | ||
| 384 | * Open a Directory from an Archive | 399 | * Open a Directory from an Archive |
| 385 | * @param archive_handle Handle to an open Archive object | 400 | * @param archive_handle Handle to an open Archive object |
| 386 | * @param path Path to the Directory inside of the Archive | 401 | * @param path Path to the Directory inside of the Archive |