summaryrefslogtreecommitdiffstats
path: root/src/dir.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-03-23 13:59:48 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-06-13 11:06:47 -0400
commit6719107e95a41b9ef241bdaa272eed505865710c (patch)
tree0d44c4640ef123ee8f74e051b6fe5c628d62de95 /src/dir.h
parent9dca9f2bcd06f921312762e0b07254f5f8f51fc2 (diff)
downloadbfs-6719107e95a41b9ef241bdaa272eed505865710c.tar.xz
dir: New bfs_polldir() function for directory readahead
Diffstat (limited to 'src/dir.h')
-rw-r--r--src/dir.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dir.h b/src/dir.h
index e0fe913..6fe7ae2 100644
--- a/src/dir.h
+++ b/src/dir.h
@@ -80,6 +80,16 @@ struct bfs_dir *bfs_opendir(int at_fd, const char *at_path);
int bfs_dirfd(const struct bfs_dir *dir);
/**
+ * Performs any I/O necessary for the next bfs_readdir() call.
+ *
+ * @param dir
+ * The directory to poll.
+ * @return
+ * 1 on success, 0 on EOF, or -1 on failure.
+ */
+int bfs_polldir(struct bfs_dir *dir);
+
+/**
* Read a directory entry.
*
* @param dir