GetPathRoot(Path: String): String;
Path - path, from which an information about a root folder must be obtained.
The GetPathRoot method returns the path to a root folder.
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: