mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-23 03:06:52 -04:00
Implement support for parsing/interacting with NCAs. (#942)
* fs: implement support for interacting with ncas. * spl: extend to use virtual keyslots
This commit is contained in:
parent
3a1ccdd919
commit
81f91803ec
118 changed files with 13301 additions and 405 deletions
|
@ -90,6 +90,18 @@ namespace ams::fs {
|
|||
}
|
||||
}
|
||||
|
||||
Result FileStorageBasedFileSystem::Initialize(std::shared_ptr<fs::fsa::IFileSystem> base_file_system, const char *path, fs::OpenMode mode) {
|
||||
/* Open the file. */
|
||||
std::unique_ptr<fs::fsa::IFile> base_file;
|
||||
R_TRY(base_file_system->OpenFile(std::addressof(base_file), path, mode));
|
||||
|
||||
/* Set the file. */
|
||||
this->SetFile(std::move(base_file));
|
||||
this->base_file_system = std::move(base_file_system);
|
||||
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
Result FileHandleStorage::UpdateSize() {
|
||||
R_SUCCEED_IF(this->size != InvalidSize);
|
||||
return GetFileSize(std::addressof(this->size), this->handle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue