2022-08-04 01:13:26 +02:00
|
|
|
#include <3ds.h>
|
|
|
|
#include <cstring>
|
2022-11-12 23:19:41 +01:00
|
|
|
#include <renderd7/FileSystem.hpp>
|
|
|
|
// Debugging
|
2022-08-04 02:50:37 +02:00
|
|
|
#include <memory>
|
2022-11-18 20:57:05 +01:00
|
|
|
#include <renderd7/stringtool.hpp>
|
2022-08-04 01:13:26 +02:00
|
|
|
|
2022-11-18 20:57:05 +01:00
|
|
|
#include <filesystem>
|
2022-08-04 01:13:26 +02:00
|
|
|
|
2023-03-07 18:09:48 +01:00
|
|
|
std::vector<RenderD7::FileSystem::Entry>
|
|
|
|
RenderD7::FileSystem::GetDirContent(std::string path) {
|
2022-11-18 20:57:05 +01:00
|
|
|
std::vector<RenderD7::FileSystem::Entry> res;
|
2023-03-07 18:09:48 +01:00
|
|
|
for (const auto &entry :
|
|
|
|
std::filesystem::directory_iterator(std::filesystem::path(path))) {
|
|
|
|
res.push_back({entry.path().string(), GetFileName(entry.path().string()),
|
|
|
|
entry.is_directory()});
|
2022-11-12 23:19:41 +01:00
|
|
|
}
|
|
|
|
return res;
|
2022-08-04 01:13:26 +02:00
|
|
|
}
|