diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-10-16 16:44:46 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-10-17 12:33:39 -0400 |
commit | 214a1f9215d33d4b9f34a3d258da1e1f4e3eb01f (patch) | |
tree | f287c493fb8233df695a2e7f7bb1ee06347f2506 /src/dir.h | |
parent | ddb476bcd224f8c262d24981af48da2fc649f43d (diff) | |
download | bfs-214a1f9215d33d4b9f34a3d258da1e1f4e3eb01f.tar.xz |
dir: Add a flags parameter to bfs_opendir()
Diffstat (limited to 'src/dir.h')
-rw-r--r-- | src/dir.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -87,6 +87,14 @@ struct bfs_dir *bfs_allocdir(void); void bfs_dir_arena(struct arena *arena); /** + * bfs_opendir() flags. + */ +enum bfs_dir_flags { + /** @internal Start of private flags. */ + BFS_DIR_PRIVATE = 1 << 0, +}; + +/** * Open a directory. * * @param dir @@ -96,10 +104,12 @@ void bfs_dir_arena(struct arena *arena); * @param at_path * The path of the directory to open, relative to at_fd. Pass NULL to * open at_fd itself. + * @param flags + * Flags that control which directory entries are listed. * @return * 0 on success, or -1 on failure. */ -int bfs_opendir(struct bfs_dir *dir, int at_fd, const char *at_path); +int bfs_opendir(struct bfs_dir *dir, int at_fd, const char *at_path, enum bfs_dir_flags flags); /** * Get the file descriptor for a directory. |