IPath.GetPathRoot

Syntax

GetPathRoot(Path: String): String;

Parameters

Path - path, from which an information about a root folder must be obtained.

Description

The GetPathRoot method returns the path to a root folder.

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 the example, the "s" variable contains c:\.

See also:

IPath