remove()
The function remove() deletes a file.
Synopsis
intremove(stringfileName);
Parameters
Parameters | Meaning |
---|---|
fileName | The file name (and file path) that should be removed, for example, string fileName = "C://Dokuments//testFile.txt"; |
Return Value
If the file was successfully deleted, the function returns 0 and in the event of an error -1.
Description
The function deletes a file. The file path must be specified.
Example
main()
{
string fileName = "C:/Documents/testFile.txt";
int rc = remove(fileName);
DebugN("The file" + fileName + "has been removed");
DebugN(rc); // Shows the return value (0= the file was removed)//
}
Assignment
File function
Availability
CTRL