[ Operating System | Reference Manual | Alphabetic Index ]

delete(+File)

The file File (with absolute or relative pathname) is deleted.
File
An atom or a string of a form acceptable to the operating system.

Description

Used to delete the file or directory File. File may be an absolute or relative filename.

Modes and Determinism

Exceptions

(4) instantiation fault
File is not instantiated.
(5) type error
File is neither an atom nor a string.
(170) system interface error
File does not exist.

Examples

Success:
      [eclipse]: sh('ls file.pl').
      file.pl
      yes.
      [eclipse]: delete('file.pl').
      yes.
      [eclipse]: sh('ls file.pl').
      file.pl not found
      yes.

Error:
      delete(File).                  (Error 4).
      delete([file]).                (Error 5).
      delete(nofile).                (Error 170).



See Also

sh / 1, system / 1, exists / 1, mkdir / 1