diff lib/functions.c @ 51:63edd4de94dd

Add xaccess()
author Rob Landley <rob@landley.net>
date Mon, 08 Jan 2007 03:25:47 -0500
parents 63c168b65fa6
children ba561c21ea27
line wrap: on
line diff
--- a/lib/functions.c	Mon Jan 08 02:49:39 2007 -0500
+++ b/lib/functions.c	Mon Jan 08 03:25:47 2007 -0500
@@ -140,6 +140,11 @@
 	error_exit("No %s", argv[0]);
 }
 
+void xaccess(char *path, int flags)
+{
+	if (access(path, flags)) error_exit("Can't access '%s'\n", path);
+}
+
 // Die unless we can open/create a file, returning file descriptor.
 int xcreate(char *path, int flags, int mode)
 {