--- parser3/src/main/pa_common.C 2001/09/14 15:41:59 1.64 +++ parser3/src/main/pa_common.C 2001/09/26 10:32:26 1.68 @@ -2,10 +2,10 @@ Parser: commonly functions. Copyright(c) 2001 ArtLebedev Group(http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) + + $Id: pa_common.C,v 1.68 2001/09/26 10:32:26 parser Exp $ */ -static const char *RCSId="$Id: pa_common.C,v 1.64 2001/09/14 15:41:59 parser Exp $"; #include "pa_common.h" #include "pa_types.h" @@ -203,6 +203,12 @@ bool file_readable(const String& file_sp bool dir_readable(const String& file_spec) { return entry_readable(file_spec, true); } +String *file_readable(const String& path, const String& name) { + String *result=new(path.pool()) String(path); + *result << "/"; + *result << name; + return file_readable(*result)?result:0; +} bool file_executable(const String& file_spec) { return access(file_spec.cstr(String::UL_FILE_SPEC), X_OK)==0; }