fix ls/0.
This commit is contained in:
parent
a2286354c8
commit
576d37510c
10
pl/utils.yap
10
pl/utils.yap
@ -220,9 +220,17 @@ cd :-
|
||||
|
||||
ls :-
|
||||
getcwd(X),
|
||||
system:directory_files(X, L),
|
||||
'$load_system_ls'(X,L),
|
||||
'$do_print_files'(L).
|
||||
|
||||
'$load_system_ls'(X,L) :-
|
||||
'$undefined'(directory_files(X, L), operating_system_support),
|
||||
load_files(library(system),[silent(true)]),
|
||||
fail.
|
||||
'$load_system_ls'(X,L) :-
|
||||
operating_system_support:directory_files(X, L).
|
||||
|
||||
|
||||
'$do_print_files'([]) :-
|
||||
nl.
|
||||
'$do_print_files'([F| Fs]) :-
|
||||
|
Reference in New Issue
Block a user