mirror of
https://github.com/NixOS/nix
synced 2025-06-29 19:03:16 +02:00
Make readDirectory() return inode / file type
This commit is contained in:
parent
1c208f2b7e
commit
daf3f2c11f
7 changed files with 48 additions and 46 deletions
|
@ -64,7 +64,16 @@ bool isLink(const Path & path);
|
|||
|
||||
/* Read the contents of a directory. The entries `.' and `..' are
|
||||
removed. */
|
||||
Strings readDirectory(const Path & path);
|
||||
struct DirEntry
|
||||
{
|
||||
string name;
|
||||
ino_t ino;
|
||||
unsigned char type; // one of DT_*
|
||||
};
|
||||
|
||||
typedef vector<DirEntry> DirEntries;
|
||||
|
||||
DirEntries readDirectory(const Path & path);
|
||||
|
||||
/* Read the contents of a file into a string. */
|
||||
string readFile(int fd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue