From 98b52e624c3d4b4754414f4caa883e797561ae56 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 24 Oct 2012 16:37:05 -0700 Subject: [PATCH] unix.ffi: adding "access". --- basis/unix/ffi/ffi.factor | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/basis/unix/ffi/ffi.factor b/basis/unix/ffi/ffi.factor index fb820949b3..e132f21ecb 100644 --- a/basis/unix/ffi/ffi.factor +++ b/basis/unix/ffi/ffi.factor @@ -54,7 +54,13 @@ STRUCT: protoent { aliases void* } { proto int } ; +CONSTANT: F_OK 0 ! test for existence of file +CONSTANT: X_OK 1 ! test for execute or search permission +CONSTANT: W_OK 2 ! test for write permission +CONSTANT: R_OK 4 ! test for read permission + FUNCTION: int accept ( int s, void* sockaddr, socklen_t* socklen ) ; +FUNCTION: int access ( c-string path, int amode ) ; FUNCTION: int bind ( int s, void* name, socklen_t namelen ) ; FUNCTION: int chdir ( c-string path ) ; FUNCTION: int chmod ( c-string path, mode_t mode ) ;