diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-10-18 08:53:40 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-10-18 08:53:40 +0000 |
commit | d6583bb2a13f329cf0332ef2570eb8bb8fc0e39c (patch) | |
tree | ece253b876159b39c620e62b6c9b1174642e070e /gnu/libexec/uucp/libunix/isdir.c |
initial import of NetBSD tree
Diffstat (limited to 'gnu/libexec/uucp/libunix/isdir.c')
-rw-r--r-- | gnu/libexec/uucp/libunix/isdir.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gnu/libexec/uucp/libunix/isdir.c b/gnu/libexec/uucp/libunix/isdir.c new file mode 100644 index 00000000000..fc95e5275a8 --- /dev/null +++ b/gnu/libexec/uucp/libunix/isdir.c @@ -0,0 +1,18 @@ +/* isdir.c + See whether a file exists and is a directory. */ + +#include "uucp.h" + +#include "system.h" +#include "sysdep.h" + +boolean +fsysdep_directory (z) + const char *z; +{ + struct stat s; + + if (stat ((char *) z, &s) < 0) + return FALSE; + return S_ISDIR (s.st_mode); +} |