System.SysUtils.RemoveDir

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function RemoveDir(const Dir: string): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall RemoveDir(const System::UnicodeString Dir);

Properties

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

Description

Deletes an existing empty directory.

Call RemoveDir to remove the directory specified by the Dir parameter. The return value is True if a new directory was successfully deleted, False if an error occurred. The directory must be emptied before it can be successfully deleted.

Note: When working with symlinks, there are some special cases to consider because of how symlinks are implemented on different platforms. On Windows, RemoveDir can only delete a symbolic link from a directory, regardless if the directory link is broken or not.

See Also