System.IOUtils.TDirectory.GetDirectoryRoot

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function GetDirectoryRoot(const Path: string): string; static;

C++

static System::UnicodeString __fastcall GetDirectoryRoot(const System::UnicodeString Path);

Properties

Type Visibility Source Unit Parent
function public
System.IOUtils.pas
System.IOUtils.hpp
System.IOUtils TDirectory

Description

Returns the root directory for a given path.

Use GetDirectoryRoot to obtain the root directory for a given path. Relative paths are considered relative to the application working directory. The following table lists the parameters expected by this method.



Name Meaning

Path

The path for which the root directory will be obtained.



Note: GetDirectoryRoot raises an exception if the given path is invalid or the directory does not exist.

See Also