49efcde301
CI / Build NRO (push) Successful in 29s
CI / Format check (push) Successful in 28s
CI / Layering check (push) Successful in 2s
CI / Build NRO (pull_request) Successful in 29s
CI / Format check (pull_request) Successful in 27s
CI / Layering check (pull_request) Successful in 1s
33 lines
610 B
C++
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};
|
|
};
|