| 44 | }; |
| 45 | |
| 46 | std::vector<std::string> files() const |
| 47 | { |
| 48 | std::vector<std::string> files; |
| 49 | struct dirent* ent; |
| 50 | while ((ent = readdir(dir_)) != nullptr) { |
| 51 | if (!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, "..")) { |
| 52 | continue; |
| 53 | } |
| 54 | files.emplace_back(ent->d_name); |
| 55 | } |
| 56 | return files; |
| 57 | } |
| 58 | |
| 59 | private: |
| 60 | DIR* dir_; |