renderd7/source/FileSystem.cpp

20 lines
581 B
C++
Raw Permalink Normal View History

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>
#include <renderd7/Ovl.hpp>
#include <renderd7/Toast.hpp>
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
2022-11-18 20:57:05 +01:00
std::vector<RenderD7::FileSystem::Entry> RenderD7::FileSystem::GetDirContent(std::string path)
{
std::vector<RenderD7::FileSystem::Entry> res;
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
}