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 UserProc;
Var
Path_File, s: String;
Begin
Path_File:="c:\Work\1.txt";
s:=Path.GetPathRoot(Path_File);
End Sub UserProc;
After executing the example, the "s" variable contains c:\.
See also: