Concept Framework 2.0 documentation Contents | Index

standard.C.io.remove

Name Version Deprecated
remove version 1.0 no

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.

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  

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

Documented by Simona Plesuvu, generation time: Fri Jan 21 18:06:20 2011 GMT(c)2011 RadGs Software