about summary refs log tree commit diff
path: root/src/libutil/util.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-01T14·37+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-01T15·14+0200
commitdaf3f2c11ff467b600473a2fda7bd513aacc1efa (patch)
tree2f69efd2cff7f7801b16ebe6a8c5b35cccf90065 /src/libutil/util.hh
parent1c208f2b7ef8ffb5e6d435d703dad83223a67bd6 (diff)
Make readDirectory() return inode / file type
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r--src/libutil/util.hh11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 64250c522a52..42215eb1d365 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -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);