summaryrefslogtreecommitdiffstats
path: root/util.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-04-08 07:47:37 -0600
committerTavian Barnes <tavianator@tavianator.com>2017-04-08 07:47:37 -0600
commit5b343f3e2515eb1077792564735f7e7c9e4c65e7 (patch)
tree11579021c4e5eeb6f35e1c02206abd070cf2cb9b /util.h
parent998ba6f6d119608b0844c0ca735044746ea1fd0f (diff)
downloadbfs-5b343f3e2515eb1077792564735f7e7c9e4c65e7.tar.xz
Move bftw_typeflag converters to util.c
Diffstat (limited to 'util.h')
-rw-r--r--util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/util.h b/util.h
index 971860b..ddc01e5 100644
--- a/util.h
+++ b/util.h
@@ -132,4 +132,14 @@ void format_mode(mode_t mode, char str[11]);
*/
const char *xbasename(const char *path);
+/**
+ * Convert a stat() st_mode to a bftw() typeflag.
+ */
+enum bftw_typeflag mode_to_typeflag(mode_t mode);
+
+/**
+ * Convert a directory entry to a bftw() typeflag.
+ */
+enum bftw_typeflag dirent_to_typeflag(const struct dirent *de);
+
#endif // BFS_UTIL_H