diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2014-09-12 00:46:42 +0200 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2014-09-17 16:35:46 +0200 |
commit | 33b0d1081e27b83408786e83ff7d13a4a2acb45c (patch) | |
tree | 5f0369be0738f053d46bc1782170e3d1b26616a6 /src/core/file_sys/directory_sdmc.h | |
parent | Kernel: Add a File object and a getter for it from an Archive object. (diff) | |
download | yuzu-33b0d1081e27b83408786e83ff7d13a4a2acb45c.tar yuzu-33b0d1081e27b83408786e83ff7d13a4a2acb45c.tar.gz yuzu-33b0d1081e27b83408786e83ff7d13a4a2acb45c.tar.bz2 yuzu-33b0d1081e27b83408786e83ff7d13a4a2acb45c.tar.lz yuzu-33b0d1081e27b83408786e83ff7d13a4a2acb45c.tar.xz yuzu-33b0d1081e27b83408786e83ff7d13a4a2acb45c.tar.zst yuzu-33b0d1081e27b83408786e83ff7d13a4a2acb45c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/file_sys/directory_sdmc.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/core/file_sys/directory_sdmc.h b/src/core/file_sys/directory_sdmc.h new file mode 100644 index 000000000..0bc6c9eff --- /dev/null +++ b/src/core/file_sys/directory_sdmc.h @@ -0,0 +1,45 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#pragma once + +#include "common/common_types.h" +#include "common/file_util.h" + +#include "core/file_sys/directory.h" +#include "core/file_sys/archive_sdmc.h" +#include "core/loader/loader.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// FileSys namespace + +namespace FileSys { + +class Directory_SDMC final : public Directory { +public: + Directory_SDMC(); + Directory_SDMC(const Archive_SDMC* archive, const std::string& path); + ~Directory_SDMC() override; + + /** + * List files contained in the directory + * @param count Number of entries to return at once in entries + * @param entries Buffer to read data into + * @return Number of entries listed + */ + u32 Read(const u32 count, Entry* entries) override; + + /** + * Close the directory + * @return true if the directory closed correctly + */ + bool Close() const override; + +private: + u32 entry_count; + u32 current_entry; + FileUtil::FSTEntry entry; +}; + +} // namespace FileSys |