Files
NXST/include/nxst/infra/fs/directory.hpp
T
DragonSpirit 1111f691c6
CI / Build NRO (push) Successful in 28s
CI / Format check (push) Successful in 33s
CI / Layering check (push) Successful in 1s
refactoring
Co-authored-by: n.fedorov <mail@nfedorov.dev>
Co-committed-by: n.fedorov <mail@nfedorov.dev>
2026-05-14 23:34:13 +03:00

33 lines
610 B
C++

// Copyright (C) 2024-2026 NXST contributors
#pragma once
#include <string>
#include <vector>
#include <switch.h>
class Directory {
public:
explicit Directory(const std::string& path);
bool good() const {
return m_good;
}
Result error() const {
return m_error;
}
size_t size() const {
return m_entries.size();
}
std::string entry(size_t i) const;
bool folder(size_t i) const;
private:
struct Entry {
std::string name;
bool is_dir;
};
std::vector<Entry> m_entries;
Result m_error{0};
bool m_good{false};
};