This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/Logtalk/library/experimental/als/system.lgt
pmoura b25690af56 Logtalk 2.17.1 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1071 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2004-06-06 22:46:45 +00:00

121 lines
1.9 KiB
Plaintext

:- object(system,
implements(systemp)).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 2004/6/5,
comment is 'Operating system interface for ALS Prolog.']).
make_directory(Directory) :-
{fail}.
delete_directory(Directory) :-
{fail}.
change_directory(Directory) :-
{change_cwd(Directory)}.
working_directory(Directory) :-
{get_cwd(Directory)}.
directory_exists(Directory) :-
{fail}.
directory_files(Directory, Files) :-
{files(Directory, '*', Files)}.
absolute_file_name(File) :-
{is_absolute_path(File)}.
absolute_file_name(File, Full) :-
{fail}.
file_base_name(File, Base) :-
{path_directory_tail(File, _, Name),
file_extension(Name, Base, _)}.
file_name_extension(File, Extension) :-
{path_directory_tail(File, _, Name),
file_extension(Name, _, Extension)}.
file_name_directory(File, Directory) :-
{path_directory_tail(File, Directory, _)}.
file_exists(File) :-
{exists_file(File)}.
file_modification_time(File, Time) :-
{file_status(File, Status),
dmember(mod_time=Time, Status)}.
file_size(File, Size) :-
{file_status(File, Status),
dmember(size=Size, Status)}.
file_type(File, Type) :-
{file_status(File, Status),
dmember(type=Type, Status)}.
file_permission(File, Permission) :-
{file_status(File, Status),
dmember(permissions=Permissions, Status),
member(Permission, Permissions)}.
delete_file(File) :-
{remove_file(File)}.
rename_file(Old, New) :-
{fail}.
symbolic_link(File, Target) :-
{fail}.
environment_variable(Variable, Value) :-
{getenv(Variable, Value)}.
set_environment_variable(Variable, Value) :-
{fail}.
date_time(Year, Month, Day, Hours, Mins, Secs, 0) :-
{datetime(Year/Month/Day, Hours:Mins:Secs)}.
convert_time(Time, Year, Month, Day, Hours, Mins, Secs, Milisecs) :-
{fail}.
cpu_time(Time) :-
{Time is cputime}.
host_name(Name) :-
{fail}.
:- end_object.