IsPathRooted(Path: String): Boolean;
Path - checked path.
The IsPathRooted method returns whether an absolute path to a file is present in a specified string.
This method does not check whether path or filename exist. The method returns True for strings like \\MyDir\MyFile.txt and C:\MyDir, and False for strings like MyDir\MyFile.txt.
Sub Main;
Var
Path_File, s: String;
Begin
Path_File:="c:\Work\1.txt";
If Path.IsPathRooted(Path_File) Then
s:="Yes";
Else
s:="No";
End If;
End Sub Main;
After executing this example, the "s" variable contains Yes if an absolute path to a file is contained in a path.
See also: