archive_sdmc.h 950 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright 2014 Citra Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <memory>
  6. #include <string>
  7. #include "core/file_sys/archive_backend.h"
  8. #include "core/hle/result.h"
  9. ////////////////////////////////////////////////////////////////////////////////////////////////////
  10. // FileSys namespace
  11. namespace FileSys {
  12. /// File system interface to the SDMC archive
  13. class ArchiveFactory_SDMC final : public ArchiveFactory {
  14. public:
  15. ArchiveFactory_SDMC(const std::string& mount_point);
  16. /**
  17. * Initialize the archive.
  18. * @return true if it initialized successfully
  19. */
  20. bool Initialize();
  21. std::string GetName() const override { return "SDMC"; }
  22. ResultVal<std::unique_ptr<ArchiveBackend>> Open(const Path& path) override;
  23. ResultCode Format(const Path& path) override;
  24. private:
  25. std::string sdmc_directory;
  26. };
  27. } // namespace FileSys