# FERASE()

Erase a file from disk

Syntax

  FERASE( <cFile> ) --> nSuccess

Arguments

  <cFile> Name of file to erase.

Returns

  <nSuccess> 0 if successful, -1 if not

Description

  This function deletes the file specified in <cFile> from the disk. No extensions are assumed. The drive and path my be included in <cFile>; neither the SET DEFAULT not the SET PATH command controls the performance of this function.If the drive or path is not used, the function will look for the file only on the currently selected direcytory on the logged drive.
  If the function is able to successfully delete the file from the disk, the value of the function will be 0; otherwise a -1 will be returned.If not successfu, aditional information may be obtained by calling the FERROR() function.
  Note: Any file to be removed by FERASE() must still be closed.

Examples

          IF (FERASE("TEST.TXT")==0)
              ? "File successfully erased"
          ELSE
              ? "File can not be deleted"
          ENDIF

Status

  Ready

Compliance

  This function is CA-Clipper Compatible

Files

  Library is rtl

See Also

- FERROR()
- FRENAME()