DeleteFile

From SCAR Divi Manual
Jump to: navigation, search

Definition

function DeleteFile(const FileName: string): Boolean;

Availability

SCAR Divi 3.25 > Current

Description

Deletes a file given by FileName and returns true if the file exists and was successfully deleted. If FileName is an invalid path, the function will throw an exception and stop the script.

Example

begin
  CloseFile(RewriteFile(LogsPath + 'test.tmp', False));
  DeleteFile(LogsPath + 'test.tmp');
end.

See Also