summaryrefslogtreecommitdiff
path: root/src/path.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/path.h')
-rw-r--r--src/path.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/path.h b/src/path.h
index abe6c2217..981fdd6a4 100644
--- a/src/path.h
+++ b/src/path.h
@@ -246,4 +246,26 @@ extern int git_path_dirload(
size_t alloc_extra,
git_vector *contents);
+
+typedef struct {
+ struct stat st;
+ size_t path_len;
+ char path[GIT_FLEX_ARRAY];
+} git_path_with_stat;
+
+extern int git_path_with_stat_cmp(const void *a, const void *b);
+
+/**
+ * Load all directory entries along with stat info into a vector.
+ *
+ * This is just like git_path_dirload except that each entry in the
+ * vector is a git_path_with_stat structure that contains both the
+ * path and the stat info, plus directories will have a / suffixed
+ * to their path name.
+ */
+extern int git_path_dirload_with_stat(
+ const char *path,
+ size_t prefix_len,
+ git_vector *contents);
+
#endif