DeleteFile

From SCAR Divi Manual
Revision as of 16:10, 2 July 2011 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> function DeleteFile(const FileName: string): Boolean; </source> ==Availability== SCAR Divi 3.25 > Current ==Description== Dele...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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