aboutsummaryrefslogtreecommitdiff
path: root/gnu/libexec/uucp/libunix/exists.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/libexec/uucp/libunix/exists.c')
-rw-r--r--gnu/libexec/uucp/libunix/exists.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gnu/libexec/uucp/libunix/exists.c b/gnu/libexec/uucp/libunix/exists.c
new file mode 100644
index 000000000000..9473922f0d53
--- /dev/null
+++ b/gnu/libexec/uucp/libunix/exists.c
@@ -0,0 +1,16 @@
+/* exists.c
+ Check whether a file exists. */
+
+#include "uucp.h"
+
+#include "sysdep.h"
+#include "system.h"
+
+boolean
+fsysdep_file_exists (zfile)
+ const char *zfile;
+{
+ struct stat s;
+
+ return stat ((char *) zfile, &s) == 0;
+}