IFileSystemInfo.Delete

Syntax

Delete;

Description

The Delete method deletes a file.

Example

Sub Main;

Var

FileSInfo: IFileSystemInfo;

Begin

FileSInfo:=New FileInfo.Attach("c:\1.txt");

If FileSInfo.Exists Then

FileSInfo.Delete;

End If;

Dispose FileSInfo;

End Sub Main;

After executing the example the 1.txt file is deleted if it exists.

See also:

IFileSystemInfo