user:prolog_file_type/2.
avoid using old OS stuff, if we have it in.
This commit is contained in:
parent
2aa76a546c
commit
d6e87420e3
@ -834,8 +834,8 @@ absolute_file_name(File,Opts,TrueFileName) :-
|
||||
'$to_list_of_atoms'(As, L1, [A|L2]),
|
||||
'$to_list_of_atoms'(Bs, L2, LF).
|
||||
|
||||
'$get_abs_file'(File,opts(_,D0,_,_,_,_,_),AbsFile) :-
|
||||
operating_system_support:true_file_name(File,D0,AbsFile).
|
||||
'$get_abs_file'(File,opts(_,_D0,_,_,_,_,_),AbsFile) :-
|
||||
'$absolute_file_name'(File,AbsFile).
|
||||
|
||||
'$search_in_path'(File,opts(Extensions,_,Type,Access,_,_,_),F) :-
|
||||
'$add_extensions'(Extensions, File, F0),
|
||||
@ -870,6 +870,9 @@ absolute_file_name(File,Opts,TrueFileName) :-
|
||||
'$add_type_extensions'(Type,File,F) :-
|
||||
'$type_extension'(Type,Ext),
|
||||
atom_concat([File,Ext],F).
|
||||
'$add_type_extensions'(Type,File,F) :-
|
||||
user:prolog_file_type(Type, File),
|
||||
atom_concat([File,Ext],F).
|
||||
|
||||
'$type_extension'(txt,'').
|
||||
'$type_extension'(prolog,'.yap').
|
||||
|
@ -168,6 +168,10 @@ yap_hacks:cut_by(CP) :- '$$cut_by'(CP).
|
||||
|
||||
:- dynamic goal_expansion/3.
|
||||
|
||||
:- multifile prolog_file_type/2.
|
||||
|
||||
:- dynamic prolog_file_type/2.
|
||||
|
||||
:- multifile goal_expansion/2.
|
||||
|
||||
:- dynamic goal_expansion/2.
|
||||
|
Reference in New Issue
Block a user