GetPathRoot(Path: String): String;
Path - path from which an information on a root directory should be obtained.
The GetPathRoot method returns a path to a root directory.
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: