IPath.GetPathRoot

Syntax

GetPathRoot(Path: String): String;

Parameters

Path - path from which an information on a root directory should be obtained.

Description

The GetPathRoot method returns a path to a root directory.

Example

Sub Main;

Var

Path_File, s: String;

Begin

Path_File:="c:\Work\1.txt";

s:=Path.GetPathRoot(Path_File);

End Sub Main;

After executing this example, the "s" variable contains c:\.

See also:

IPath