Show: Delphi C++
Display Preferences

System.SysUtils.ForceDirectories

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ForceDirectories(Dir: string): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall ForceDirectories(System::UnicodeString Dir);

Properties

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

Description

Creates a new directory, including the creation of parent directories as needed.

ForceDirectories creates a new directory as specified in Dir, which must be a fully-qualified path name. If the directories given in the path do not yet exist, ForceDirectories attempts to create them.

ForceDirectories returns True if it successfully creates all necessary directories, False if it could not create a needed directory.

Note: Do not call ForceDirectories with an empty string. Doing so causes ForceDirectories to raise an exception.
Note: The Vcl.FileCtrl unit (Windows only) contains a ForceDirectories function that is deprecated. System.SysUtils.ForceDirectories is preferred, and can be used in multi-device applications.

See Also

Code Examples

Personal tools
RAD Studio 10.2 Tokyo
In Other Languages
Previous Versions
Assistance