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:
parent
c371070580
commit
a3c573950b
18 changed files with 52 additions and 59 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue