[ ECLiPSe Operating System built-in.|Group Index| Full Index]

cd(+Directory)

Directory is made the current working directory. Equivalent to set_flag(cwd, Directory).

+Directory
Atom or string of any form acceptable to the operating system.

Description

Changes the current working directory to Directory. Directory may be an absolute or relative pathname.

Fail Conditions

None.

Resatisfiable

No.

Exceptions

(4) Instantiation fault
Directory is not instantiated.
(5) Type error
Directory is neither an atom nor a string.
(170)
Directory doesn't exist.

Examples


Success:
      cd(workdir).
      cd("workdir").
      cd('/home/lp/user/workdir').
      cd('..').
      cd('../workdir').

Error:
      cd(Dir).                    (Error 4).
      cd(20).                     (Error 5).
      cd('nonexist').             (Error 170).


See Also

getcwd / 1, set_flag / 2