chdir/1

Gets or sets the current working directory

chdir(Directory) -(i),(o)

?Directory <atom> or <variable>

Compatibility: LPA Win-Prolog.

Remarks: This predicate can be used to get or set the current working Directory: this is the directory relative to which G.I.S. Prolog searches for a file when no absolute directory information is specified as part of the file name. When Directory is given as an atom, this forces the current working directory to change to whatever directory this atoms specifies; otherwise, when Directory is an unbound variable, it returns an atom which names the existing current working directory.