fix ls/0.

This commit is contained in:
Vítor Santos Costa 2010-11-22 18:22:53 +00:00
parent a2286354c8
commit 576d37510c

View File

@ -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]) :-