fix user c predicates
fix Makefiles to handle case where so is o. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@183 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -147,10 +147,22 @@ file_property(File, Type, Size, Date) :-
|
||||
file_property(File, Type, Size, Date, _Permissions, Error),
|
||||
handle_system_error(Error, off, file_property(File)).
|
||||
|
||||
file_exists(File) :-
|
||||
var(File), !,
|
||||
throw(error(instantiation_error,file_exists(File))).
|
||||
file_exists(File) :-
|
||||
\+ atom(File), !,
|
||||
throw(error(type_error(atom,File),file_exists(File))).
|
||||
file_exists(File) :-
|
||||
file_property(File, _Type, _Size, _Date, _Permissions, Error),
|
||||
var(Error).
|
||||
|
||||
file_exists(File, Permissions) :-
|
||||
var(File), !,
|
||||
throw(error(instantiation_error,file_exists(File, Permissions))).
|
||||
file_exists(File, Permissions) :-
|
||||
\+ atom(File), !,
|
||||
throw(error(type_error(atom,File),file_exists(File, Permissions))).
|
||||
file_exists(File, Permissions) :-
|
||||
file_property(File, _Type, _Size, _Date, FPermissions, Error),
|
||||
var(Error),
|
||||
|
Reference in New Issue
Block a user