standard.C.io.remove

remove is available since version 1.0.

Prototype:

number remove(string path)

Parameters

path
[in] Path of file to be removed

Description:

The remove function deletes the file or directory specified by path. All handles to a file must be closed before it can be deleted. See also _unlink and _rmdir.

Return value:

remove returns 0 if the file is successfully deleted. Otherwise, it returns -1.

Example
import standard.C.io

define FILENAME     "test.txt"

class Main {
     function Main() {          
          if (remove(FILENAME))
               echo "Could not delete "+FILENAME;
          else
               echo "Deleted "+FILENAME;
     }
}  

Results 
Deleted test.txt