summaryrefslogtreecommitdiff
path: root/src/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/io.c b/src/io.c
index 737be12..b998fc4 100644
--- a/src/io.c
+++ b/src/io.c
@@ -872,6 +872,13 @@ int io_check_dir(const char *dir)
}
}
+unsigned io_dir_exists(const char *path)
+{
+ struct stat st;
+
+ return (!stat(path, &st) && S_ISDIR(st.st_mode));
+}
+
unsigned io_file_exists(const char *file)
{
FILE *fd;