archive_systemsavedata.cpp 908 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2014 Citra Emulator Project
  2. // Licensed under GPLv2+
  3. // Refer to the license.txt file included.
  4. #include <sys/stat.h>
  5. #include "common/common_types.h"
  6. #include "common/file_util.h"
  7. #include "core/file_sys/archive_systemsavedata.h"
  8. #include "core/file_sys/disk_archive.h"
  9. #include "core/settings.h"
  10. ////////////////////////////////////////////////////////////////////////////////////////////////////
  11. // FileSys namespace
  12. namespace FileSys {
  13. Archive_SystemSaveData::Archive_SystemSaveData(const std::string& mount_point)
  14. : DiskArchive(mount_point) {
  15. LOG_INFO(Service_FS, "Directory %s set as SystemSaveData.", this->mount_point.c_str());
  16. }
  17. bool Archive_SystemSaveData::Initialize() {
  18. if (!FileUtil::CreateFullPath(mount_point)) {
  19. LOG_ERROR(Service_FS, "Unable to create SystemSaveData path.");
  20. return false;
  21. }
  22. return true;
  23. }
  24. } // namespace FileSys