]> gitweb.factorcode.org Git - factor.git/commitdiff
unix.ffi: adding "access".
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 24 Oct 2012 23:37:05 +0000 (16:37 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 24 Oct 2012 23:37:05 +0000 (16:37 -0700)
basis/unix/ffi/ffi.factor

index fb820949b3abbe384f5654387add5ae94495621e..e132f21ecb5c77855cce1a8f929666f9d9b33569 100644 (file)
@@ -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 ) ;