cd

BAP Online Manuals : Library Reference : Library by Name : cd
Previous: call
Next: char

6.2.15. cd

either gets or sets the host-servers current directory

SYNOPSIS

INCLUDE 'iolib.h'
cd(Dir),write(Dir),nl,
cd('../user/prg')

SYNTAX

cd(Directory) (x)

ARGUMENTS

string(Directory) (i) Directory to which to switch
string(Directory) (o) path of the current directory

DESCRIPTION

If Directory is instantiated to a valid Directory, addressed either absolute of relative, it is set to be the new current directory. If Directory is unbound, it is bound to a string describing the current directory.

ERRORS

fails if Directory is bound to something other than a string, or if the current directory was not set for some reason (e.g. Directory does not exist).

LAYERS

prolog-process, client-server, object

RELATED PREDICATES

openread , openwrite , see , tell


BAP Online Manuals : Library Reference : Library by Name : cd
Previous: call
Next: char