1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 01:11:15 +02:00

Replace our DirEntry with std::filesystem's

This commit is contained in:
John Ericson 2024-05-07 11:29:33 -04:00
parent c371070580
commit a3c573950b
18 changed files with 52 additions and 59 deletions

View file

@ -122,17 +122,7 @@ bool isLink(const Path & path);
* Read the contents of a directory. The entries `.` and `..` are
* removed.
*/
struct DirEntry
{
std::string name;
std::filesystem::file_type type;
DirEntry(std::string name, std::filesystem::file_type type)
: name(std::move(name)), type(type) { }
};
typedef std::vector<DirEntry> DirEntries;
DirEntries readDirectory(const Path & path);
std::vector<std::filesystem::directory_entry> readDirectory(const Path & path);
std::filesystem::file_type getFileType(const Path & path);