Next:
Profiling
Up:
Interface with Operating Systems
Previous:
Building standalone applications
Contents
Index
Commands
system(Command)
:
Sends
Command
to the OS.
system(Command,Status)
:
Sends
Command
to the OS, and binds
Status
to the status that is returned from the OS.
chdir(Atom)
:
cd(Atom)
:
Changes the current working directory to
Atom
.
get_cwd(Dir)
:
getcwd(Dir)
:
Binds
Dir
to the current working directory.
date(Y,M,D)
: The current date is
Y
year,
M
month, and
D
day.
date(Date)
: Assume that the current date is
Y
year,
M
month, and
D
day. Then,
Date
is unified with the term
date(Y,M,D)
.
time(H,M,S)
: The current time is
H
hour,
M
minute, and
S
second.
get_environment(EVar,EValue)
:
environ(EVar,EValue)
: The environment variable
EVar
has the value
EValue
.
expand_environment(Name,FullName)
:
FullName
is a copy of
Name
, except that environment variables are replaced by their definitions.
copy_file(Name,NameCp)
: Copies a file.
delete_directory(Name)
: Deletes the directory named
Name
, if it exists.
delete_file(Name)
: Deletes a file.
directory_exists(Name)
: Determines whether a directory with the name
Name
exists.
directory_files(Name,List)
:
List
is the list of all of the files in the directory named
Name
. The order of the files in
List
is undefined.
file_base_name(Name,Base)
:
Base
is the base name of the file named
Name
.
file_directory_name(Name,Dir)
:
Dir
is the directory that contains the file named
Name
.
file_exists(Name)
: Determines whether a file with the name
Name
exists.
file_property(Name,Property)
: The file or directory with the name
Name
has the property
Property
, where
Property
is one of the following:
type(Value)
:
Value
is one of the following:
regular
,
directory
,
symbolic_link
,
fifo
, and
socket
.
access_time(Value)
:
Value
is the latest access time.
modification_time(Value)
:
Value
is the latest modification time.
status_change_time(Value)
:
Value
is the time of the most recent file status change.
size(Value)
:
Value
is the size of the file in bytes.
permission(Value)
:
Value
is one of the following:
read
,
write
, and
execute
.
file_stat(Name,Property)
: This predicate calls the C function
stat
, and unifies
Property
with a structure of the following form:
stat(St_dev,St_ino,St_mode,St_nlink,St_uid,St_gid, St_rdev,St_size,St_atime,St_mtime,St_ctime)
Refer to the C language manual for the meanings of these arguments.
make_directory(Name)
: Creates a new directory named
Name
.
rename_file(OldName,NewName)
: Renames the file named
OldName
into
NewName
.
working_directory(Name)
: This is the same as
get_cwd(Name)
.
Next:
Profiling
Up:
Interface with Operating Systems
Previous:
Building standalone applications
Contents
Index
Neng-Fa Zhou 2013-01-25