Path.IsPathRooted Method
Gets a value indicating whether the specified path string contains absolute or relative path information.
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Syntax
public static bool IsPathRooted (
stringpath
)
Parameters
- path
The path to test.
Return Value
true if path contains an absolute path; otherwise, false.
Remarks
This method does not verify that the path or file name exists. IsPathRooted returns true for path strings such as "\\MyDir\\MyFile.txt"
and "C:\\MyDir"
. It returns false for path strings such as "MyDir"
.
Version Information
Available in the .NET Micro Framework versions 3.0, 4.0, and 4.1.