System.SysUtils.DeleteFile

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function DeleteFile(const FileName: string): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall DeleteFile(const System::UnicodeString FileName);

Properties

Type Visibility Source Unit Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

Deletes a file from disk.

DeleteFile deletes the file named by FileName from the disk. If the file cannot be deleted or does not exist, the function returns False.

Note: DeleteFile can delete a symbolic link from a file or a directory and is the preferred method for deleting symlinks.

See Also


Code Examples