1 /* Copyright Vladimir Prus 2003. 2 * Distributed under the Boost Software License, Version 1.0. 3 * (See accompanying file LICENSE_1_0.txt or copy at 4 * http://www.boost.org/LICENSE_1_0.txt) 5 */ 6 7 #include "../constants.h" 8 #include "../frames.h" 9 #include "../lists.h" 10 #include "../native.h" 11 #include "../filesys.h" 12 13 path_exists(FRAME * frame,int flags)14LIST * path_exists( FRAME * frame, int flags ) 15 { 16 return file_query( list_front( lol_get( frame->args, 0 ) ) ) ? 17 list_new( object_copy( constant_true ) ) : L0; 18 } 19 20 init_path()21void init_path() 22 { 23 char const * args[] = { "location", 0 }; 24 declare_native_rule( "path", "exists", args, path_exists, 1 ); 25 } 26