IsPathRooted(Path: String): Boolean;
Path - checked path.
The IsPathRooted method returns whether an absolute path to a file is present in the specified string.
The method does not check if path or file name exist. The method returns True for strings like: \\MyDir\MyFile.txt and C:\MyDir, and False for strings like: MyDir\MyFile.txt.
Sub UserProc;
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 UserProc;
After executing the example, the "s" variable contains Yes if an absolute path to a file is contained in a path.
See also: