FErase()

FERASE()

Erase any file from disk by low-level access

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 directory 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 successfull, additional information may be obtained by calling the FERROR() function.

Note: Any file to be removed by FERASE() must still be closed.

Examples

      #include "fileio.ch"
      IF FErase( "test.txt" ) != F_ERROR
         ? "File successfully erased"
      ELSE
         ? "File can not be deleted"
      ENDIF

Compliance

Clipper

Files

Library is rtl

Seealso

FERROR(), FRENAME()

Advertisements

3 responses to “FErase()

  1. Pingback: Harbour All Functions – F | Viva Clipper !

  2. Pingback: Harbour Files and Folders Functions | Viva Clipper !

  3. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s